Skip to content

Commit

Permalink
update error response for non-snapshots (#860)
Browse files Browse the repository at this point in the history
  • Loading branch information
icosahedral authored Mar 19, 2024
1 parent 2c75905 commit 605e551
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
18 changes: 18 additions & 0 deletions specification/resources/snapshots/responses/not_a_snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
description: Bad Request

headers:
ratelimit-limit:
$ref: '../../../shared/headers.yml#/ratelimit-limit'
ratelimit-remaining:
$ref: '../../../shared/headers.yml#/ratelimit-remaining'
ratelimit-reset:
$ref: '../../../shared/headers.yml#/ratelimit-reset'

content:
application/json:
schema:
$ref: '../../../shared/models/error.yml'
example:
id: bad_request
message: the resource is not a snapshot
request_id: bbd8d7d4-2beb-4be1-a374-338e6165e32d
3 changes: 3 additions & 0 deletions specification/resources/snapshots/snapshots_delete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ responses:
'204':
$ref: '../../shared/responses/no_content.yml'

'400':
$ref: 'responses/not_a_snapshot.yml'

'401':
$ref: '../../shared/responses/unauthorized.yml'

Expand Down
3 changes: 3 additions & 0 deletions specification/resources/snapshots/snapshots_get.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ responses:
'200':
$ref: 'responses/snapshots_existing.yml'

'400':
$ref: 'responses/not_a_snapshot.yml'

'401':
$ref: '../../shared/responses/unauthorized.yml'

Expand Down

0 comments on commit 605e551

Please sign in to comment.