core: return the intended status code from error views for all request methods (cherry-pick #24902 to version-2026.5) - #24957
Merged
Conversation
…t methods (#24902) * core: return the intended status code from error views for all request methods The views wired up as django's handler400/403/404/500 subclassed TemplateView directly. TemplateView only implements `get`, so its `dispatch` answers a failing POST/PUT/PATCH/DELETE with 405 Method Not Allowed and an `Allow: GET, HEAD, OPTIONS` header, discarding the status code the handler stands for. Any non-GET request that reached an error handler -- on any endpoint -- was reported as a 405 rather than the actual 400/403/404/500. Add a shared ErrorView base that renders the page for every method, and widen the dramatiq result handling in the outgoing sync mixin from ResultFailure to ResultError so a queued-but-not-yet-reported task returns the task log instead of escaping as an unhandled 500. closes #24230 * Apply suggestion from @rissson Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> Signed-off-by: Jens L. <jens@beryju.org> --------- Signed-off-by: Jens L. <jens@beryju.org> Co-authored-by: Jens L. <jens@beryju.org> Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
3 tasks
BeryJu
approved these changes
Aug 10, 2026
❌ 9 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of #24902 to
version-2026.5branch.Original PR: #24902
Original Author: @Souptik96
Cherry-picked commit: aca619f