Skip to content

custom 404 messages #351

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

Closed
wants to merge 2 commits into from
Closed

custom 404 messages #351

wants to merge 2 commits into from

Conversation

bisguzar
Copy link
Contributor

I think we need to raise 404 errors with custom messages. Because flask saying 'page doesn't exist' as default. But its not true, and not friendly for restful apis

@insspb
Copy link
Collaborator

insspb commented Jan 21, 2020

Track changes in #361

@insspb insspb closed this Jan 21, 2020
insspb added a commit that referenced this pull request Jan 21, 2020
* UPDATED: Functions `get_or_404`, `first_or_404` now accepts `message` argument, and will display custom message if specified. (#351)
* UPDATED: `get_or_404` will raise 404 error only on `DoesNotExist` exception,  other exceptions should be captured by user. (#360)

Co-authored-by: Buğra İşgüzar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants