You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/OpenAPIRuntime/Interface/ErrorHandlingMiddleware.swift
+19-20Lines changed: 19 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
//
3
3
// This source file is part of the SwiftOpenAPIGenerator open source project
4
4
//
5
-
// Copyright (c) 2023 Apple Inc. and the SwiftOpenAPIGenerator project authors
5
+
// Copyright (c) 2024 Apple Inc. and the SwiftOpenAPIGenerator project authors
6
6
// Licensed under Apache License v2.0
7
7
//
8
8
// See LICENSE.txt for license information
@@ -14,16 +14,14 @@
14
14
15
15
import HTTPTypes
16
16
17
-
/// Error Handling middleware that converts an error to a HTTP response
17
+
/// An opt-in error Handling middleware that converts an error to a HTTP response.
18
18
///
19
-
/// This is an opt-in middleware that adopters may choose to include to convert application errors
20
-
/// to a HTTP Response
21
-
///
22
-
/// Inclusion of this ErrorHandling Middleware should be accompanied by confirming errors to
23
-
/// HTTPResponseConvertible protocol. Only errors confirming to HTTPResponseConvertible are converted to a HTTP response. Other errors are re-thrown from this middleware.
19
+
/// Inclusion of ``ErrorHandlingMiddleware`` should be accompanied by confirming errors to ``HTTPResponseConvertible`` protocol.
20
+
/// Undocumented errors, i.e, errors not confriming to ``HTTPResponseConvertible`` are converted to a response with 500 status code.
24
21
///
25
22
/// Example usage
26
-
/// 1. Create an error type that conforms to HTTPResponseConvertible protocol
23
+
/// 1. Create an error type that conforms to HTTPResponseConvertible protocol:
0 commit comments