OpenHands
OpenHands copied to clipboard
modify all api response to the same format (JSONResponse with status_code and content set)
Thanks for @Umpire2018 's suggestion, cc @rbren , modify the response format to the same like
# success:
return JSONResponse(
status_code=status.HTTP_200_OK,
content=models,
)
# failed:
return JSONResponse(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
content={'error': error_msg},
)
previous pr: https://github.com/OpenDevin/OpenDevin/pull/1158