Skip to content

fix RenderingCreditBalanceTooLow error code handling#181

Merged
pedjaradenkovic merged 1 commit into
mainfrom
fix-rendering-credit-balance-error-handling
May 11, 2026
Merged

fix RenderingCreditBalanceTooLow error code handling#181
pedjaradenkovic merged 1 commit into
mainfrom
fix-rendering-credit-balance-error-handling

Conversation

@pedjaradenkovic

@pedjaradenkovic pedjaradenkovic commented May 10, 2026

Copy link
Copy Markdown
Contributor

The client mapped the API error code "CreditBalanceTooLow" but the server actually sends "RenderingCreditBalanceTooLow", so the error fell through to a generic "400 Client Error: BAD REQUEST" message instead of surfacing the server's message (which contains the purchase/upgrade URL).

Align the client with the server's error code and pass the server message through unchanged.

This should also solve: https://github.com/orgs/Codeplain-ai/projects/1?pane=issue&itemId=169443976&issue=Codeplain-ai%7Ccodeplain-webapp%7C20

The client mapped the API error code "CreditBalanceTooLow" but the
server actually sends "RenderingCreditBalanceTooLow", so the error
fell through to a generic "400 Client Error: BAD REQUEST" message
instead of surfacing the server's message (which contains the
purchase/upgrade URL). Align the client with the server's error
code and pass the server message through unchanged.
@pedjaradenkovic pedjaradenkovic requested a review from NejcS May 10, 2026 21:00

@NejcS NejcS 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.

Ahhh, so simple. Yeah it looks like it fixes the webapp ticket too.

@pedjaradenkovic pedjaradenkovic merged commit ddf0ec2 into main May 11, 2026
10 checks passed
@pedjaradenkovic pedjaradenkovic deleted the fix-rendering-credit-balance-error-handling branch May 11, 2026 07:52
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.

2 participants