> ## Documentation Index
> Fetch the complete documentation index at: https://docs.methodfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Request Errors

export const ParamList = ({items = [], is_child = false}) => {
  return items.map(item => {
    const field_props = {
      id: Math.random().toString(),
      body: item.name,
      name: item.name,
      type: item.type,
      required: item.required
    };
    const enums = item.enums || [];
    const items = item.items || [];
    const has_items = items?.length > 0;
    const has_enums = enums?.length > 0;
    const should_default_open = item.defaultOpen || false;
    const render_child_item = () => {
      const child_props = {
        title: has_enums ? "Possible enum values" : "properties"
      };
      if (should_default_open) child_props.defaultOpen = true;
      const has_inline_enums = has_enums && enums.every(enum_item => typeof enum_item === 'string') && enums.map((enum_item, idx) => {
        const is_last = idx === enums.length - 1;
        const is_2nd_to_last = idx === enums.length - 2;
        return <>
            <code>{enum_item}</code>
            {is_last && ''}
            {is_2nd_to_last && ' or '}
            {!is_last && !is_2nd_to_last && ', '}
          </>;
      });
      const enum_list = has_enums && !has_inline_enums && <Accordion {...child_props}>
          {enums.map((enum_item, index) => <div key={`enum-${index}`}>
              <code>{enum_item.name}</code>
              <br />
              <p>{enum_item.description}</p>
            </div>)}
        </Accordion>;
      const item_list = has_items && <Expandable {...child_props}>
          <ParamList items={items || []} is_child />
        </Expandable>;
      return <>
          <p>
            {item.description}
            {has_inline_enums && [has_inline_enums.length > 1 ? ' One of ' : ' Must be ', ...has_inline_enums]}
          </p>

          {enum_list}
          {item_list}
        </>;
    };
    return is_child ? <ResponseField {...field_props}>{render_child_item()}</ResponseField> : <ParamField {...field_props}>{render_child_item()}</ParamField>;
  });
};

Method uses conventional HTTP response codes to indicate the success or failure of an API request.
In general: Codes in the `2xx` range indicate success. Codes in the `4xx` range indicate an error occurred
with the information provided (e.g., a required parameter was omitted, a resource was not found, etc.).
Codes in the `5xx` range indicate an error occurred within Method's servers.

## Attributes

<ParamList
  items={[
{
  name: "error",
  type: "object",
  description: "Unique identifier for the Error.",
  defaultOpen: true,
  items: [

    {
      name: "error.type",
      type: "enum",
      description: (
        <>
          The type of error returned. Possible enums are{" "}
          <code>INVALID_AUTHORIZATION</code>, <code>INVALID_REQUEST</code>,
          or <code>API_ERROR</code>.
        </>
      ),
    },
    {
      name: "error.code",
      type: "number",
      description:
        "The HTTP error code. This is the same as the status code.",
    },
    {
      name: "error.sub_type",
      type: "string",
      description:
        "This field gives more unique types that will be used to identify the error.",
    },
    {
      name: "error.message",
      type: "string",
      description:
        "A human-readable message providing more details about the error.",
    },
  ],
},
]}
/>

#### HTTP STATUS CODE SUMMARY

| code  | function            | Description                                                                                                                                                |
| ----- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `200` | `OK`                | Everything worked as expected.                                                                                                                             |
| `400` | `Bad Request`       | The request was unacceptable, often due to missing a required parameter.                                                                                   |
| `401` | `Unauthorized`      | No valid API key provided.                                                                                                                                 |
| `403` | `Forbidden`         | The API key doesn't have permissions to perform the request.                                                                                               |
| `404` | `Not Found`         | The requested resource doesn't exist.                                                                                                                      |
| `429` | `Too Many Requests` | Too many requests hit the API too quickly. We recommend an exponential backoff of your requests. See [Rate Limiting](/2026-03-30/reference/rate-limiting). |
| `500` | `Server Errors`     | Something went wrong on Method's end.                                                                                                                      |

<RequestExample>
  ```javascript THE ERROR OBJECT theme={null}
  {
    "type": "INVALID_REQUEST",
    "code": 400,
    "sub_type": "INVALID_SOURCE_LIABILITY",
    "message": "Invalid source account received. Only ACH accounts can be used as a source."
  }
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "success": false,
    "data": {
      "error": {
        "type": "INVALID_REQUEST",
        "code": 400,
        "sub_type": "INVALID_SOURCE_LIABILITY",
        "message": "Invalid source account received. Only ACH accounts can be used as a source."
      }
    },
    "message": "Invalid source account received. Only ACH accounts can be used as a source."
  }
  ```
</ResponseExample>
