Errors

Overview

Our API uses HTTP status codes to indicate the success or failure of an API request.

  • 2xx: indicates a successful request
  • 4xx: indicates a failed request due to a developer or user-related error(s)
  • 5xx: indicates a failed request due to a Railway-related issue(s)

Error schema

NameTypeDescription
error_typestringA broad categorization of the error that delineates by the responsible entity (ex: Railway, the developer, the patient, the EHR, etc). It is safe for programmatic use
error_messagestringA developer-friendly message explaining the error. It is not intended for your customer.
error_codestringAn optional field that categorizes the broad error type in more detail. It is safe for programmatic use.
detailstring[]An optional array of error messages. It is only included for validation errors (ex: invalid POST request body).

HTTP status code summary

Status CodeDescription
200 - OKSuccess
400 - Bad RequestA malformed request, not adhering to the endpoint’s specification.
401 - UnauthorizedA valid secret key was not provided.
403 - ForbiddenThe provided secret key does not have the required permissions for the API request.
404 - Not FoundThe resource does not exist.
429 - Too Many RequestsThe rate limits have been exceeded. Wait before retrying.
500 - Server ErrorAn unexpected error within Railway’s servers.

Error types

The error_type is a broad categorization that delineates by the responsible entity (ex: Railway, the developer, the patient, the EHR, etc).

Error TypeReasonResolution
server_errorThe error is caused by Railway.Retry once after 30 seconds. If the issue persists, contact us at [email protected] as the issue is likely not ephemeral.
invalid_requestThe error is caused by the developer. Ex: invalid request body parameters.You will need to update the API request being sent. Ensure you have proper error logging and handling for the various error_codes defined below.

Error codes

An optional field that categorizes the broad error type in more detail.

Error codeDescription
resource_not_foundThe request was sent to a non-existent resource or a resource the secret key doesn't have access to.
invalid_body_parametersThe API request body contained invalid parameters. Check the endpoint's API specification.
invalid_query_parametersThe API request contained invalid query parameters. Check the endpoint's API specification.
invalid_api_versionFind valid API versions here.
missing_api_versionRead about the API version header here.
missing_secret_keyA secret key was not passed in the Authorization header. Read more here.
invalid_secret_keyA valid secret key was not passed in the Authorization header. Read more here.
missing_index_versionThe requested endpoint requires an index version. Read more here.
invalid_index_versionAn invalid index version was provided; it either doesn't exist or is not associated with the provided secret key. Read more here.
forbidden_index_operationThe requested operation could not be performed on the requested index. This can happen when you are attempting to modify a read-only index. Read more here.
invalid_schedule_idThe provided schedule_id does not exist, is not accessible with the provided secret key, or is not associated with the provided index version.
invalid_patient_idThe provided patient_id does not exist, is not accessible with the provided secret key, or is not associated with the provided index version.
invalid_slotThe provided slot (start_at and/or duration) does not exist or is not available on the schedule anymore.