You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in py-skygear, SkygearException allows us to cusomize an error response:
raiseSkygearException(
code=9999,
message='Something has gone wrong. Handle it in client side.',
info={},
)
It would produce a http response like this:
HTTP/1.1 500 Internal Server Error
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Length: 142
Content-Type: application/json
Date: Wed, 31 Jan 2018 14:14:35 GMT
Server: Skygear Server/1.2.0-31-g68cb380
{
"error": {
"code": 9999,
"message": "You have done something wrong. Handle it in client side.",
"name": "ErrorCode(9999)"
}
}
Note that skygear always returns a 500, while such errors are typically a 4xx. It would be great if skygear could provide a way for dev to decide a different http status code to provide better semantics for their API.
Skygear Server Date/Version: v1.3.1
Application Platform: go, python
Is this a regression?
Attached logs, screenshots
Expected Results
Actual Results
Steps to reproduce
The text was updated successfully, but these errors were encountered:
Currently in py-skygear,
SkygearException
allows us to cusomize an error response:It would produce a http response like this:
Note that skygear always returns a 500, while such errors are typically a 4xx. It would be great if skygear could provide a way for dev to decide a different http status code to provide better semantics for their API.
Expected Results
Actual Results
Steps to reproduce
The text was updated successfully, but these errors were encountered: