Uncatched ClientException-s
Issue #136
resolved
When I try get http://127.0.0.1:8000/2.2/anime/cast/2 I get 500 Symphony exception instead MAL 404.
Second: It is difficult to guess whether 500 is an application error, or download from the MAL.
You should wrap response with something like this.
{
"status": <status-code>,
"msg": "<informational message. might vary, use the status code in your code!>",
"result": <result of the request. varies depending on the request>
}
Comments (2)
-
-
- changed status to resolved
Fix Uncaught 404 in Cast
Catch a situation where cast for a non-existent title would result in a server error. Now properly handle it and return a 404.
Fixes
#136→ <<cset 0b46694837ed>>
- Log in to comment
In general, errors via MAL are returned with an error structure as described in the documentation. If we aren't doing that and should, that's a bug.
We may consider changing the error return value in a future release where we can break compatibility.