Skip to content

fix(webapp): recognize object-store 404 by status code for missing transcripts - #4987

Closed
mahenoorsalat wants to merge 1 commit into
triggerdotdev:mainfrom
mahenoorsalat:fix-4984-object-store-404-status
Closed

mahenoorsalat wants to merge 1 commit into
triggerdotdev:mainfrom
mahenoorsalat:fix-4984-object-store-404-status

Conversation

@mahenoorsalat

Copy link
Copy Markdown

Fixes #4984

A missing transcript returned 502 instead of 404 when the object store's 404 response had an empty reason phrase.

  • Aws4FetchClient download errors now carry the HTTP \status\ (\ObjectStoreDownloadError), instead of only \statusText.
  • \isTranscriptNotFound\ checks \status === 404\ first, keeping the existing message-regex fallback.
  • Regression test serves raw \HTTP/1.1 404\ with no reason phrase and asserts the rejection satisfies \isTranscriptNotFound.
  • Adds .server-changes\ fix note.

Prepared with AI assistance.

…anscripts

Aws4FetchClient download errors now carry the HTTP status, and
isTranscriptNotFound checks status 404 first so an empty reason
phrase no longer surfaces as a 502.

Fixes triggerdotdev#4984
@changeset-bot

changeset-bot Bot commented Sep 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 01445d6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

Hi @mahenoorsalat, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details.

@github-actions github-actions Bot closed this Sep 28, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Devin Review

// The aws4fetch adapter reports the HTTP status on the error. Check it first:
// S3-compatible stores may return an empty reason phrase, so the message alone
// cannot distinguish a 404 from other failures.
if (status === 404) return true;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 Message fallback can override a known status

When a download error has a non-404 status and a Not Found reason phrase, isTranscriptNotFound still returns true. The message fallback runs even when ObjectStoreDownloadError carries a definitive status.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 7b12a8d8-73be-4450-9893-2f3cc498f58d

📥 Commits

Reviewing files that changed from the base of the PR and between 07374a9 and 01445d6.

📒 Files selected for processing (4)
  • .server-changes/fix-transcript-404-empty-reason-phrase.md
  • apps/webapp/app/services/realtime/transcriptDownload.server.test.ts
  • apps/webapp/app/services/realtime/transcriptDownload.server.ts
  • apps/webapp/app/v3/objectStoreClient.server.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: an object-store 404 with an empty reason phrase makes a missing transcript a 502 instead of a 404

1 participant