mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 19:08:52 +00:00
c1f3c51427
This is useful when differentiating different error responses. Example: if let e = error { switch e { case ErrorResponse.Error(400, _, _): responseLabel.text = "Unknown error" case ErrorResponse.Error(403, _, _): responseLabel.text = "Not logged in" default: responseLabel.text = "\(e)" } } The existing error is straight from Alamofire and only includes the HTTP status code in the body of the message (not broken out as a separate value). It also does not include the response body, which may be useful. |
||
---|---|---|
.. | ||
petstore | ||
petstore-security-test |