Skip to content

docs(openapi): Document 404 related errors on acts and actor-builds endpoints#2308

Merged
Pijukatel merged 5 commits intomasterfrom
improve-errors-on-actors-actor-runs
Mar 5, 2026
Merged

docs(openapi): Document 404 related errors on acts and actor-builds endpoints#2308
Pijukatel merged 5 commits intomasterfrom
improve-errors-on-actors-actor-runs

Conversation

@Pijukatel
Copy link
Contributor

@Pijukatel Pijukatel commented Mar 4, 2026

Summary

  • Create reusable error response schemas
  • Use granular 404 errors
  • Autogenerate 404 error response examples if possible

(Done only for acts and actor-builds endpoints to limit the scope of the change. It should be done to all endpoints in follow-up PRs)

Motivation

  • Preparation for adding undocumented redispatch endpoints, which will re-use the error schemas.
  • Properly document different 404 errors returnable by the endpoint. This will give the user a better idea about potential failures.

Example of granular 404s for an endpoint that relies on multiple resources:

image

Issues

Partially implements: #2286


Note

Cursor Bugbot is generating a summary for commit f16d5e5. Configure here.

@github-actions github-actions bot added this to the 135th sprint - Tooling team milestone Mar 4, 2026
@github-actions github-actions bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Mar 4, 2026
@apify-service-account
Copy link

Preview for this PR was built for commit 2931bf4c and is ready at https://pr-2308.preview.docs.apify.com!

@Pijukatel Pijukatel force-pushed the improve-errors-on-actors-actor-runs branch from 2931bf4 to e43a091 Compare March 4, 2026 12:49
@Pijukatel Pijukatel added the adhoc Ad-hoc unplanned task added during the sprint. label Mar 4, 2026
@apify-service-account
Copy link

Preview for this PR was built for commit e43a091f and is ready at https://pr-2308.preview.docs.apify.com!

@Pijukatel Pijukatel removed the adhoc Ad-hoc unplanned task added during the sprint. label Mar 4, 2026
@Pijukatel Pijukatel changed the title docs(openapi): Document 404 related errors on acts endpoints docs(openapi): Document 404 related errors on acts and actor-builds endpoints Mar 4, 2026
@Pijukatel Pijukatel force-pushed the improve-errors-on-actors-actor-runs branch from a74a75f to 1cf995a Compare March 4, 2026 13:04
@apify-service-account
Copy link

Preview for this PR was built for commit a74a75f0 and is ready at https://pr-2308.preview.docs.apify.com!

@apify-service-account
Copy link

Preview for this PR was built for commit 1cf995a5 and is ready at https://pr-2308.preview.docs.apify.com!

@Pijukatel Pijukatel marked this pull request as ready for review March 4, 2026 13:10
@apify-service-account
Copy link

Preview for this PR was built for commit f16d5e58 and is ready at https://pr-2308.preview.docs.apify.com!

@Pijukatel Pijukatel requested a review from janbuchar March 4, 2026 14:08
@apify-service-account
Copy link

Preview for this PR was built for commit 560a4c89 and is ready at https://pr-2308.preview.docs.apify.com!

Copy link
Contributor

@janbuchar janbuchar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit, one potential point for discussions. Nothing worth stalling this, so please accept my approval.

content:
application/json:
schema:
oneOf:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also seems redundant and the other files have it too 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed, where redundant

enum: [actor-not-found]
message:
type: string
enum: [Actor was not found]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although I like it, I'm not sure if this level of detail is necessary (declaring the exact text of every error response) 😁

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Plus the exact definition might be too strict sometimes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I kept the constraint on error.type.
  • I relaxed the error.message constraint and instead put the text to example (It will render the same, and it will not be so strict.

Copy link
Member

@fnesveda fnesveda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one issue with the "build with tag not found" error.

enum: [actor-not-found]
message:
type: string
enum: [Actor was not found]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Plus the exact definition might be too strict sometimes.

Relax the error message constraints
@apify-service-account
Copy link

Preview for this PR was built for commit a3f21554 and is ready at https://pr-2308.preview.docs.apify.com!

@Pijukatel Pijukatel requested a review from fnesveda March 5, 2026 10:20
@Pijukatel Pijukatel merged commit 3dbfff5 into master Mar 5, 2026
13 checks passed
@Pijukatel Pijukatel deleted the improve-errors-on-actors-actor-runs branch March 5, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants