fix: add error response examples to session-insights API#85
Merged
benhepworth merged 5 commits intocamaraproject:mainfrom Apr 16, 2026
Merged
Conversation
Add examples section to all error response definitions following the CAMARA_common.yaml r3.2 reference pattern: - BadRequest400: INVALID_ARGUMENT, OUT_OF_RANGE - Generic401: UNAUTHENTICATED - Forbidden403: PERMISSION_DENIED, INVALID_TOKEN_CONTEXT - NotFound404: NOT_FOUND, IDENTIFIER_NOT_FOUND - Conflict409: ABORTED, ALREADY_EXISTS, CONFLICT - Generic410: GONE - Generic422: SERVICE_NOT_APPLICABLE, MISSING_IDENTIFIER, UNSUPPORTED_IDENTIFIER, UNNECESSARY_IDENTIFIER - Generic429: QUOTA_EXCEEDED, TOO_MANY_REQUESTS
Kevsy
previously approved these changes
Apr 7, 2026
Contributor
Kevsy
left a comment
There was a problem hiding this comment.
Thanks @mohdfarhanakram - LGTM
benhepworth
reviewed
Apr 8, 2026
Contributor
benhepworth
left a comment
There was a problem hiding this comment.
looks good @mohdfarhanakram - thanks for putting this PR in! One minor thing - the Out of Range is a QoD thing (probably copied from it's error responses/examples). I suggested removing it. This will now conflict with PR 84, but we can hash that out when merging.
Co-authored-by: Ben Hepworth <125334035+benhepworth@users.noreply.github.com>
Co-authored-by: Ben Hepworth <125334035+benhepworth@users.noreply.github.com>
Contributor
Author
|
Thanks @benhepworth for catching that you are right, OUT_OF_RANGE is QoD-specific and doesn't belong here. Applied both suggestions. |
benhepworth
approved these changes
Apr 16, 2026
Contributor
benhepworth
left a comment
There was a problem hiding this comment.
merge conflict resolved - looks good now
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.
What type of PR is this?
correction
What this PR does / why we need it:
Adds the missing
examplessection to all error response definitions insession-insights.yaml, following the pattern established inCAMARA_common.yaml(Commonalities r3.2). This was flagged as a requirement for Commonalities alignment.allOfschema with properstatusandcodeenums toBadRequest400,Forbidden403,NotFound404, andConflict409(previously using plainErrorInforeferences)examplesto all 8 error responses:BadRequest400:INVALID_ARGUMENT,OUT_OF_RANGEGeneric401:UNAUTHENTICATEDForbidden403:PERMISSION_DENIED,INVALID_TOKEN_CONTEXTNotFound404:NOT_FOUND,IDENTIFIER_NOT_FOUNDConflict409:ABORTED,ALREADY_EXISTS,CONFLICTGeneric410:GONEGeneric422:SERVICE_NOT_APPLICABLE,MISSING_IDENTIFIER,UNSUPPORTED_IDENTIFIER,UNNECESSARY_IDENTIFIERGeneric429:QUOTA_EXCEEDED,TOO_MANY_REQUESTSWhich issue(s) this PR fixes:
Fixes #71
Special notes for reviewers:
PR #84 (issue #70) also modifies
BadRequest400to addINVALID_SINK,INVALID_CREDENTIAL, andINVALID_TOKENcodes. If #84 merges first, this PR may have a minor conflict in that section -- happy to rebase and resolve.Changelog input
Additional documentation