Comments (4)
This is intentional. You are creating the response, you can already set it's code.
from werkzeug.
Understood 😄
from werkzeug.
@davidism But why shouldn't the exception have the same code as the response? Especially if it's an explicit field in HTTPException made for that.
from werkzeug.
Sorry to spam you with messages, just the last clarification:
The aborter raises a HTTPException
. It doesn't set the status code.
Another library handles the HTTPException
. It tries to access e.code
and errors out.
Do you suggest to use e.reponse.status_code
instead of that? I get it. It may be confusing, but if that's the decision, I'll go with a PR for the other library
from werkzeug.
Related Issues (20)
- Relative redirects expose applications to open-redirect issues HOT 3
- Built-in converters do not check syntax of the parameters
- send_file not inserting quote around filename HOT 4
- Some relative redirect strings incorrectly bypass iri_to_uri normalization. HOT 2
- docs: update urlparse import
- test.Client is incorrectly using isinstance check instead of issubclass
- Request not closed with Unicode characters in headers HOT 1
- Double slashes aren't being handled correctly
- send_file does not include mimetype .webp images HOT 2
- `Rule.endpoint` type annotation doesn't comply with the documentation
- werkzeug > 2.2.2 throws WinError 10038 during flask debug app reload HOT 2
- ProxyFix with x_port should skip standard 80 or 443 ports HOT 6
- `pyright` in strict mode errors when using `formparser.MultiPartParser.parse`
- MultiDict does not handle None values HOT 1
- Test regression with pytest-8.0.0: `tests/test_exceptions.py::test_response_body[RequestRedirect]` HOT 2
- Add "421 Misdirected Request" http exception
- Update runtime dependencies HOT 1
- Random "ssl.SSLEOFError: EOF occurred in violation of protocol" when handling HTTP 206 HOT 2
- OSError: [WinError 10038] An operation was attempted on something that is not a socket HOT 2
- `FileStorage.name` should be the filename HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from werkzeug.