Comments (2)
Just to revisit this, are there really OpenAPI specs that declare 500 responses? It seems like a 500 response almost always arises as a result of a bug/flaw/unforeseen issue. My point is, it seems like a 5XX error should trigger a validation failure. I can definitely see it for 4XX because this is indicative of the client doing something wrong and, therefore, we not only need the client to know they failed but obviously enumerate (via the OpenAPI spec) all the ways the client can fail in this request. But I just don't see this with a 5XX. I think those should not trigger validation failures. My 2 cents.
from huma.
This behavior has changed a bit in v2. There is no longer a restriction on what status codes you can set and the panic handling is now router-specific, so you can choose to use your router's panic handler, Huma v1's panic handler, or do something else.
from huma.
Related Issues (20)
- Support Discriminator and DiscriminatorMap HOT 2
- Setting headers in error response HOT 6
- Add more tests for cookie HOT 3
- Add custom header from SSE Handler HOT 3
- How should nullable query params be handled without pointers? HOT 4
- Add support for netip.Addr HOT 1
- Forwarding headers through the middleware not working HOT 5
- Override ErrorModel for single operations HOT 6
- Feature: Accept valueless path/query/header/cookie tags
- Docs UI doesn't handle multiple cookies properly HOT 1
- Allow custom Transform for nested objects HOT 2
- Error thrown when setting cli name HOT 2
- Error return for huma.StreamResponse.Body HOT 1
- Schema(r huma.Registry) *huma.Schema not working on Pointer
- Validation errors localization HOT 2
- Question: Is there a way to add comments to fields? HOT 1
- Version Chi v4 Into Separate Release
- Removing schema reference in response HOT 2
- Multiline doc description for struct fields
- Bug: API doc hidden is not *real* hidden HOT 1
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 huma.