Skip to content

Commit 205d78c

Browse files
author
Gayathri Sairamkrishnan
committed
Review comments
1 parent e29736a commit 205d78c

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func getGreeting(_ input: Operations.getGreeting.Input) async throws -> Operatio
3333
} catch let error {
3434
switch error {
3535
case GreetingError.authorizationError:
36-
return (HTTPResponse(status: 404), nil)
36+
return .unauthorized(.init())
3737
case GreetingError.timeout:
3838
return ...
3939
}
@@ -125,7 +125,7 @@ extension MyAppError: HTTPStatusConvertible {
125125

126126
```swift
127127
let handler = try await RequestHandler()
128-
try handler.registerHandlers(on: transport, middlewares: [ErrorHandlingMiddleware()])
128+
try handler.registerHandlers(on: transport, middlewares: [ErrorMiddleware()])
129129

130130
```
131131

0 commit comments

Comments
 (0)