apple / apple/swift-openapi-generator

Consider ErrorHandlingMiddleware turning arbitrary errors into JSON error bodies

Open
#677 0 comments 0 reactions 0 assignees View on GitHub
kind/enhancement status/needs-design
Dominant language
Swift
Stars
2k
Forks
182
Avg merge
13h 28m
Merged PRs (30d)
5

Description

### Motivation

See the discussion on this thread, we left it out of the implementation of SOAR-0011: https://github.com/apple/swift-openapi-runtime/pull/126#discussion_r1836133413

### Proposed solution

We should consider it as an opt-in feature, similar behavior to Vapor (which enables it for debug only automatically).

### Alternatives considered

_No response_

### Additional information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the discussion in SOAR-0011 and the linked pull request, especially discussion_r1836133413, then review how Vapor handles arbitrary errors and debug-only behavior. The issue does not name files or tests; completion would require an agreed opt-in design for ErrorHandlingMiddleware to produce JSON error bodies.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.