Skip to main content

How errors are reported

Every error of the Sally API uses the same JSON body, so one error handler is enough. This page shows that body, what each status code means for your integration, every machine-readable code, an example body per status and a handler you can copy.

The examples work as they stand once SALLY_TOKEN and DIRECTORY_ID are set, see the Quickstart.

Quick navigation

  1. The error body
  2. The status codes
  3. The error codes
  4. Example bodies
  5. 403 and 404 mean different things
  6. Handle errors in code

1. The error body​

429 Too Many Requests
{
"statusCode": 429,
"message": "<human-readable text>",
"code": "FUP_LIMIT_EXCEEDED"
}
FieldTypeAlways presentMeaning
statusCodeintegeryesThe HTTP status code, repeated in the body.
messagestringyesA human-readable description. Show or log it, but do not branch on it.
codestringnoA stable, machine-readable identifier for specific errors.

code is a stable, machine-readable identifier. It is only present for errors that deserve their own reaction, such as FUP_LIMIT_EXCEEDED or TOO_MANY_CONCURRENT_TRANSCRIPTIONS. Generic errors leave it out, so branch on code when it is there and on statusCode otherwise.

Note

The text of message is meant for people and can change, and it may be German. Live responses may also carry an error field with the HTTP reason phrase, such as Unauthorized. It is not part of the documented body, so do not rely on it.

2. The status codes​

CodeMeaningWhat to doRetry?
400The request is invalid: body, query or path failed validation.Fix the request, for example a misspelled name in fields.No
401The bearer token is missing or no longer valid.Check the Authorization header or create a new token.No
403You can see the resource, but the operation needs a higher role, for example admin or owner, or the company account has disabled it, for example a download. Check code here.Use a token of a user with the required role, or have the setting of the company account changed.No
404Not found or not visible to you.Check the id and whether the token user has access.No
409Conflict with the current state, for example inviting someone who is already a member, or requesting a transcript file before the transcript exists. Check code here.Treat it as already done, or read the current state.No
429Rate limit exceeded, for uploads also the fair-usage limit. Check code here.See Rate limits & fair usage.Depends on code
500Internal server error. Retrying later is reasonable.Retry later with a growing pause.Yes

3. The error codes​

These are all values code can take. Branch on them, they do not change.

codeStatusWhereMeaning and what to do
UNKNOWN_DOCUMENT_FORMAT400Summary and transcript as a fileformat is missing or not supported by this endpoint. The body lists the allowed values.
UNKNOWN_LANGUAGE_CODE400Summary and transcript as a filelanguageCode is unknown. The body lists the allowed values.
SUMMARY_DOWNLOAD_PREVENTED403Summary as a fileThe company account has disabled downloading summaries for its members. A retry gives the same answer.
TRANSCRIPT_DOWNLOAD_PREVENTED403Transcript as a fileThe company account has disabled downloading transcripts for its members. A retry gives the same answer.
RECORDING_EXISTS_CHOICE_REQUIRED409Finalizing an uploadThe linked appointment already has a recording. Repeat the call with choice set to copy or replace, the uploaded file is kept.
SUMMARY_HAS_NO_CONTENT409Summary as a fileThe summary has no content for a document, because it was generated before meeting templates existed or its template has no sections.
TRANSCRIPT_NOT_AVAILABLE409Transcript as a fileThe recording has no transcript yet. Check isTranscriptionSucceeded on the recording first.
FUP_LIMIT_EXCEEDED429UploadsThe fair-usage limit is used up. Stop uploading, retrying soon gives the same answer. See Rate limits & fair usage.
TOO_MANY_CONCURRENT_TRANSCRIPTIONS429UploadsToo many transcriptions of the company account are running at once. Wait until some have finished.

4. Example bodies​

These are the bodies you can expect per status. Where the example shows <human-readable text>, the real message varies with the cause.

400, for example an unknown field name:

400 Bad Request
{
"statusCode": 400,
"message": "<human-readable text>"
}

401, request without a token and request with an invalid token. These two are real answers of the API:

401 Unauthorized
{
"message": "`Authorization: Bearer <token>` ist erforderlich.",
"error": "Unauthorized",
"statusCode": 401
}
401 Unauthorized
{
"message": "Ungültiger oder abgelaufener API-Key.",
"error": "Unauthorized",
"statusCode": 401
}

403, the operation needs a higher role:

403 Forbidden
{
"statusCode": 403,
"message": "<human-readable text>"
}

403 with a code, for example when the company account has disabled downloading summaries:

403 Forbidden
{
"statusCode": 403,
"message": "<human-readable text>",
"code": "SUMMARY_DOWNLOAD_PREVENTED"
}

404, not found or not visible:

404 Not Found
{
"statusCode": 404,
"message": "<human-readable text>"
}

409, for example the invited person is already a member:

409 Conflict
{
"statusCode": 409,
"message": "<human-readable text>"
}

429 comes in three variants. The plain rate limit has no code, the two fair-usage cases do:

429 Too Many Requests
{
"statusCode": 429,
"message": "<human-readable text>"
}
429 Too Many Requests
{
"statusCode": 429,
"message": "<human-readable text>",
"code": "FUP_LIMIT_EXCEEDED"
}
429 Too Many Requests
{
"statusCode": 429,
"message": "<human-readable text>",
"code": "TOO_MANY_CONCURRENT_TRANSCRIPTIONS"
}

500, internal server error:

500 Internal Server Error
{
"statusCode": 500,
"message": "<human-readable text>"
}

5. 403 and 404 mean different things​

This means

A 403 tells you the resource exists and your role is too low or the company account has disabled the operation, which a person can fix. A 404 deliberately tells you nothing: not found and not visible cannot be told apart, so a response never reveals that data exists. Authentication explains why a token sees what it sees.

403 Forbidden404 Not Found
Does the resource exist?YesUnknown, on purpose
Can you see it?YesNot with this token
Who can fix it?An admin or owner, by giving the user a higher role or changing the setting of the company accountNobody through the API. Check the id and the token user's access.

6. Handle errors in code​

Read the body on every non-2xx answer, then decide by code first and statusCode second:

# Body and status separately, then decide on code and statusCode
response=$(curl -s -w '\n%{http_code}' \
"https://api.sally.io/v1.0/directories/$DIRECTORY_ID/recordings/$RECORDING_ID" \
-H "Authorization: Bearer $SALLY_TOKEN")
status=$(echo "$response" | tail -n 1)
body=$(echo "$response" | sed '$d')

if [ "$status" -ge 400 ]; then
echo "$body" | jq -r '"\(.statusCode) \(.code // "-") \(.message)"'
fi
Recommendation

Log statusCode, code and message together with the method and path of the request. That is usually enough to find the cause without reproducing the call.