Skip to content

refactor(auth): a missing embedded file answers 404 without an error type of its own - #565

Merged
PiquelChips merged 1 commit into
mainfrom
refactor/544-accounts-assets
Nov 21, 2026
Merged

PiquelChips merged 1 commit into
mainfrom
refactor/544-accounts-assets

Conversation

@PiquelChips

@PiquelChips PiquelChips commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Part of #544

assets.rs declared AssetError, a one-variant enum with its own From<AssetError> for ApiError, only so EmbeddedAssets::serve could answer 404 for a path that isn't an embedded file. That's 15 lines of error plumbing for one response. serve now builds that ApiError::not_found directly, as the picture route's serve already does, and its doc comment says which response it gives.

Unchanged: an unknown path gets the same ApiError::not_found("There is no page at this address."), so the same status, JSON body and headers. Nothing else used AssetError.

Tests: none merged or removed. Files outside my area: none.

Checks: just fmt; cargo clippy -p auth-service --all-targets with and without --all-features (-D warnings); cargo doc -p auth-service --all-features (-D warnings); just rust unused. just db test --no-fail-fast: 494 of 497 passed. keys::tests::rewrapping_seals_every_key_under_the_current_key_encryption_key, keys::tests::rotation_takes_each_step_once_on_schedule and security::tests::rate_limits::rate_limit_deadline_includes_a_blocked_database_query failed on timing while the machine's load average was about 75. All three pass when rerun alone, and this diff touches neither module.

Note

Written by Claude Opus 5.5 in Claude Code and reviewed by GPT 6.1 Sol (via T3 Code)

@PiquelChips
PiquelChips marked this pull request as draft November 20, 2026 07:15
@github-project-automation github-project-automation Bot moved this to Needs Triage in sourceorigin.dev Nov 20, 2026
@PiquelChips PiquelChips added refactor No behviour changes apps/auth-service Origin Auth at auth.sourceorigin.dev, its settings and developer console, and the operator CLI labels Nov 20, 2026
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 23 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7a99e5f8-e39c-49f5-9d42-e59f1ee283d0
Commits

Reviewing files that changed from the base of the PR and between 467e813 and 905d2be.

Files selected for processing: 1

  • apps/auth-service/src/assets.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@PiquelChips
PiquelChips marked this pull request as ready for review November 20, 2026 07:22
@PiquelChips
PiquelChips marked this pull request as draft November 21, 2026 14:00
@PiquelChips
PiquelChips marked this pull request as ready for review November 21, 2026 14:44
@PiquelChips
PiquelChips added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 5b3cf9a Nov 21, 2026
13 checks passed
@PiquelChips
PiquelChips deleted the refactor/544-accounts-assets branch November 21, 2026 16:39
@github-project-automation github-project-automation Bot moved this from Needs Triage to Done in sourceorigin.dev Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apps/auth-service Origin Auth at auth.sourceorigin.dev, its settings and developer console, and the operator CLI refactor No behviour changes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant