-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RESTFul About 404 error handling #14775
Comments
Do you have an |
As @schmunk42 said, in order to respond 404 in this case, custom error handler is needed. I think it's a good idea to document it. Pretty standard use case. |
This usecase has not documented yet. |
it is handled in this action 'errorHandler' => [
'errorAction' => 'site/error',
], |
@phpyii have you try in rest application? |
custom error handler does already work, the only thing that is missing in this issue is documentation. |
I've tried all kinds of "solutions" for this problem and none of them work for me.
All existing actions work perfectly fine. How am I supposed to work around this? I don't see a non-hackish way to fix this. |
Issue moved to yiisoft/yii-api#13 |
What steps will reproduce the problem?
return 200 ok
return 404 this is normal
Returned the html 404 page,He should return the same format as xml or json as in the second step.
What is the expected result?
Returns a formatted xml or json.
What do you get instead?
Additional info
The text was updated successfully, but these errors were encountered: