apple / swift-openapi-generator

Generate Swift client and server code from an OpenAPI document.
https://swiftpackageindex.com/apple/swift-openapi-generator/documentation
Apache License 2.0
1.45k stars 120 forks source link

Consider ErrorHandlingMiddleware turning arbitrary errors into JSON error bodies #677

Open czechboy0 opened 2 days ago

czechboy0 commented 2 days ago

Motivation

See the discussion on this thread, we left it out of the implementation of SOAR-0011: https://github.com/apple/swift-openapi-runtime/pull/126#discussion_r1836133413

Proposed solution

We should consider it as an opt-in feature, similar behavior to Vapor (which enables it for debug only automatically).

Alternatives considered

No response

Additional information

No response