> For the complete documentation index, see [llms.txt](https://developerdocs.instructure.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developerdocs.instructure.com/services/journey/api/errors.md).

# Errors

Journey reports errors using the conventions of the underlying transport. REST endpoints (mounted under `https://journey-server-prod.us-east-1.core.inseng.io/api/v1`) return standard HTTP status codes with a JSON body. GraphQL endpoints (`/graphql`) usually return `200 OK` with failures reported in an `errors` array on the response body, but malformed requests may return non-200.

## Response shape

```json
{
  "statusCode": 404,
  "message": "Program not found",
  "error": "Not Found"
}
```

When validation rejects a payload, `message` is an array of validation strings rather than a single string.

```json
{
  "statusCode": 400,
  "message": ["userAccountId must be a UUID"],
  "error": "Bad Request"
}
```

## Status codes

* `400 Bad Request` — malformed payload, failed validation, or a domain precondition violation.
* `401 Unauthorized` — missing or invalid Canvas JWT. See [authentication](/services/journey/api/authentication.md).
* `403 Forbidden` — authenticated caller lacks the required Canvas permission. See [permissions](/services/journey/api/permissions.md).
* `404 Not Found` — the referenced resource does not exist or is not visible to the caller.
* `500 Internal Server Error` — unhandled error. The response body contains a generic message; the full error and stack trace are emitted to the server logs.

Other 4xx and 5xx codes can occur for endpoint-specific conditions, but the codes above cover the common cases.

## GraphQL errors

GraphQL operations commonly return HTTP `200 OK` even when some fields fail. Failures are reported in the response body as an `errors` array alongside any partial `data`. Malformed requests (for example parse/validation failures) may return a non-200 status code. Journey uses the GraphQL server's default error format, so a failure surfaces with its original message and an `extensions.code` field (for example `BAD_USER_INPUT` or `INTERNAL_SERVER_ERROR`).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developerdocs.instructure.com/services/journey/api/errors.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
