Appearance
Problem types
Some endpoints answer errors as problem details (RFC 9457). Each error names its problem type in type. This is a stable URI under https://code.salaxy.com/problems/ that opens the page describing it.
Endpoints that use problem details say so on their own page. Today these are the payment channel config endpoints (v04 beta). Other endpoints use the error shape in Error handling.
The response
A problem details response has Content-Type: application/problem+json and this body:
json
{
"type": "https://code.salaxy.com/problems/validation-failed",
"status": 422,
"title": "The payment channel config is not valid.",
"errors": {
"debitAccount.iban": [ "The IBAN is not valid." ],
"data.agreementId": [ "Required." ]
}
}| Field | Notes |
|---|---|
type | The problem type. Branch on this URI, or on the status — never on the text. |
status | The HTTP status code, the same as the response's. |
title | A short summary, the same for every occurrence of the type. |
detail | An explanation of this occurrence. Can be missing. |
errors | validation-failed only: the messages per field, keyed by the field's path in the request body, for example data.agreementId. |
title, detail and the messages in errors follow the Accept-Language request header: fi or en. The language is Finnish when the header is missing or names neither. Content-Language names the language of the response.
401 and 403 are never problem details. They come from the authentication, as on every endpoint. See Error handling.
Types
| Type | Status | Meaning |
|---|---|---|
not-found | 404 | The resource does not exist. |
channel-not-available | 409 | The payment channel is not available to the company. |
concurrent-change | 409 | Concurrent changes kept the write from saving. Nothing was saved. |
precondition-failed | 412 | If-Match or If-None-Match does not hold. |
unsupported-media-type | 415 | The request body has the wrong content type. |
validation-failed | 422 | The request body is not valid; errors lists the messages per field. |
internal-error | 500 | An unexpected error in Salaxy. |

