Repository navigation
feat(api): return rfc 9457 problem details for errors - #180
Merged
Merged
Conversation
Extension members are written as top-level members of the problem. Claude-Session: https://claude.ai/code/session_012BmpdMdQ5wwagagQvfcq8S
Contributor
Test results 33 files 33 suites 38s ⏱️ Results for commit bf6086d. ♻️ This comment has been updated with latest results. |
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
All error responses of the Otis API now use RFC 9457 Problem Details (
application/problem+json). This prepares the upcoming player settings API (stacked PR), which needs stable error types.typeURI (https://otis.onelitefeather.net/problems/<slug>),title,statusand, where useful,detail. Generic HTTP errors useabout:blankwith the status reason phrase as title.constraint-violationwith aviolations[]extension member.OTEL_TRACES_EXPORTER!=none), every problem carries atraceIdmember to look the request up in the tracing backend.ProblemDetailresponses for every operation. The client is generated from the newjava-client/specs/otis-api-1.1.0.yml(1.0.1 stays in place) and gainsProblemDetails.from(ApiException).CLAUDE.mdnow states that the client uses Jackson and describes the problem details.add-problem-details(proposal, spec, design, tasks) and the OpenSpec scaffolding are included.Compatibility (old plugins)
/otis/**and/search/**do not change. Only the error body and itsContent-Typechange. Releasedvelocity-pluginbuilds only evaluate status codes (404/500).ExistingEndpointsCompatibilityTestwas written first and verified against unchangedmain. It still passes after the switch.javap -publicof the generated client before and after: additions only (ProblemDetail,ProblemViolationand their builders,ProblemDetails).velocity-plugincompiles andshadowJarbuilds without source changes.Deviations / notes
micronaut-problem-json3.9.0 is based onorg.zalando:problem. Its error processor is deprecated, so the body provider is replaced, and extension members are flattened to the top level as RFC 9457 requires.micronaut-tracing-opentelemetry-httpmarks every server span with status >= 400 as ERROR. That differs from the OTel semantic conventions, and there is no switch for it. The spec was narrowed to "problem rendering does not touch the span" instead of replacing the built-in tracing filter.application-test.yml, CI has no Docker) withtransactional = false, because two transaction managers make micronaut-test's transaction listener ambiguous.Test plan
./gradlew clean build: 50 tests, 0 failures, 1 skipped (pre-existing disabledOtisTest)mainand on this branchjavapdiff contains additions only;velocity-pluginshadowJar builds unchangedhttps://claude.ai/code/session_012BmpdMdQ5wwagagQvfcq8S