worker: adapt to new oapi-codegen

This commit is contained in:
Sanne Raymaekers 2025-03-21 11:56:43 +01:00 committed by Ondřej Budai
parent b2700903ae
commit 17416bf60b
4 changed files with 26 additions and 50 deletions

View file

@ -130,11 +130,9 @@ func APIError(code ServiceErrorCode, serviceError *serviceError, c echo.Context)
}
return &Error{
ObjectReference: ObjectReference{
Href: fmt.Sprintf("%s/errors/%d", BasePath, se.code),
Id: fmt.Sprintf("%d", se.code),
Kind: "Error",
},
Href: fmt.Sprintf("%s/errors/%d", BasePath, se.code),
Id: fmt.Sprintf("%d", se.code),
Kind: "Error",
Code: fmt.Sprintf("%s%d", ErrorCodePrefix, se.code),
OperationId: operationID, // set operation id from context
Reason: se.reason,