Skip to content

Commit 09bd716

Browse files
Update Sources/swift-openapi-generator/Documentation.docc/Proposals/SOAR-0011.md
Co-authored-by: Honza Dvorsky <[email protected]>
1 parent 205d78c commit 09bd716

File tree

1 file changed

+1
-1
lines changed
  • Sources/swift-openapi-generator/Documentation.docc/Proposals

1 file changed

+1
-1
lines changed

Sources/swift-openapi-generator/Documentation.docc/Proposals/SOAR-0011.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ introduces a way for users to map errors thrown by their handlers to specific HT
1818

1919
### Motivation
2020

21-
When implementing a server with Swift OpenAPI Generator, users implement a type that conforms to a generated protocol, providing one method for each API operation defined in the OpenAPI document. At runtime, if this function throws, the runtime library transforms this into a 500 HTTP response (Internal Error).
21+
When implementing a server with Swift OpenAPI Generator, users implement a type that conforms to a generated protocol, providing one method for each API operation defined in the OpenAPI document. At runtime, if this function throws, it's up to the server transport to transform it into an HTTP response status code – for example, some transport use `500 Internal Error`.
2222

2323
Instead, server developers may want to map errors thrown by the application to a more specific HTTP response.
2424
Currently, this can be achieved by checking for each error type in each handler's catch block, converting it to an

0 commit comments

Comments
 (0)