Commit graph

6 commits

Author SHA1 Message Date
Lukas Zapletal
a58a399008 v2: update errors test for new error type
The oapi-codegen update to v2.5.0 changed the Details field of the main
Error type to be an empty interface. This requires updates to the error
handling tests to accommodate the new structure.
2025-08-05 18:55:32 +02:00
Sanne Raymaekers
ca19a5b5ed cloudapi/v2: add test for errors 2024-06-25 17:27:28 +02:00
Sanne Raymaekers
135dd94de5 cloudapi/v2: include details in case internal error is set
In case details aren't explicitly given, and the internal error is set,
include the internal error message in the details.
2024-06-25 17:27:28 +02:00
Chloe Kaubisch
765e93bfc8 cloudapi: get specific error from openapi
Error handling is structured in such a way that typically, a ServiceCodeError is passed
through the echo HTTP error, in reference to internally defined errors. We want to be able
to obtain and return specific external errors, for example during validation from openapi3.
Add a 'details' field to the serviceError struct, to contain extra / externally defined
information. Modify HTTPErrorHandler to anticipate either a string or a ServiceErrorCode
from echo, and respond accordingly. Edit the affected tests to expect the appropriate response.
2022-06-28 10:02:55 +02:00
sanne
6ce20a9ef6 cloudapi/v2: Listen on /api/image-builder-composer/v2 2021-10-11 09:52:21 +02:00
sanne
5a9d8c792b cloudapi: V2
V2 is compliant with api.openshift.com design guidelines.

Errors are predefined, have codes, and are queryable.

All requests have an operationId set: a unique identifier which is
sortable by time. This is added to the response in case of an error.

All returned objects have the href, id, and kind field set.
2021-09-14 15:32:21 +02:00