Skip to content

API reference repeats the full error type list in every error response #3259

Open

Description

@TC-MO

Every API reference page prints the full list of 404 error types from ErrorType.yaml  in each error response. The list makes most pages too long for AI agents to read. It also seems to include internal error types that don't belong in public docs.

Problem 1: pages are too long for agents

ErrorType.yaml  is about 12,000 characters.  ErrorDetail.yaml  uses it for the error  type , and all 11 shared error responses in components/responses/  build on ErrorDetail . As a result, the OpenAPI plugin inlines the full list into every error response. In the  .md  copy that agents read,  rehypeExpandTabs  opens the hidden tabs, so every copy ends up in the text.

Problem 2: the list includes internal error types

#2428 added every error type from the  apify-core  errors package, whether or not the public API returns it.

None of the 404 types has a description, so readers can't tell which ones apply to them. Which types are actually internal is a question for the API team.

Points to check before changing the spec:

Related, and worth fixing in the same PR: the shared  401 Unauthorized example shows  invalid-token. The live API returns  token-not-provided when the token is missing and  user-or-token-not-found  when it's wrong (components/responses/Unauthorized.yaml).

Activity

  1. added
    documentation
    t-docs
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationt-docs

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions