fix(server): map Account failures to typed 500 instead of defect#26448
Merged
Conversation
0f255af to
edf91a8
Compare
1a71f21 to
fa6504b
Compare
edf91a8 to
15779da
Compare
fa6504b to
2cd4bf8
Compare
15779da to
1df6d83
Compare
2cd4bf8 to
1df6d83
Compare
4942d9a to
3ca5a02
Compare
751ab84 to
b30384a
Compare
3ca5a02 to
c2855a3
Compare
b30384a to
d799e48
Compare
c2855a3 to
3076f21
Compare
d799e48 to
c931995
Compare
The /experimental/console and /experimental/console/orgs handlers previously piped account.orgsByAccount() through Effect.orDie. That converts typed AccountServiceError into a defect, so the runtime serializes it as a 500 with the raw stack trace embedded in the response body — and any future error middleware that wants to distinguish account failures from other 500s sees only an opaque defect. Replace Effect.orDie with Effect.catch mapping to HttpApiError.InternalServerError, and declare InternalServerError on the endpoint schemas. The wire response is still 500, but the body is the structured HttpApi error shape (no stack-trace leak) and the failure stays on the typed channel for downstream handlers to inspect.
c931995 to
8d4bea4
Compare
katosun2
pushed a commit
to katosun2/opencode
that referenced
this pull request
May 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan