Skip to content

Conversation

@winnisx7
Copy link

Summary

This PR adds the proposal document for SOAR-0015, which introduces ClientErrorHandler and ServerErrorHandler protocols for centralized error observation.

Related Links

Motivation

Currently, swift-openapi-runtime provides limited options for centralized error handling. Developers must handle errors individually at each API call site, leading to code duplication. The existing ClientMiddleware operates at the HTTP level and cannot intercept errors that occur during response decoding or other runtime operations.

This proposal introduces protocol-based error handlers that are invoked after errors have been wrapped in ClientError or ServerError, enabling centralized logging, monitoring, and analytics.

What's in this PR

  • Adds Sources/_OpenAPIGeneratorCore/Documentation.docc/Proposals/SOAR-0015.md

Checklist

  • Proposal document added
  • Implementation PR linked

@winnisx7
Copy link
Author

Hi @czechboy0, I've created the proposal document as suggested. Would appreciate your review when you have a chance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant