Repository navigation
fix(api): show the Socket API's error message on failed requests - #1627
Merged
Oskar Haarklou Veileborg (BarrensZeppelin) merged 1 commit intoOct 19, 2026
Merged
Oskar Haarklou Veileborg (BarrensZeppelin) merged 1 commit into
Oskar Haarklou Veileborg (BarrensZeppelin) merged 1 commit into
Conversation
sendApiRequest and queryApiSafeTextWithStatus now include the `error.message` the Socket API returns in its error body, next to the generic per-status guidance they already gave. The API uses it to explain failures the status code alone can't, such as a version spec it can't serve. getDefaultApiBaseUrl always falls back to the default API URL, so its return type is now `string` and the unreachable "not configured" branches are gone.
Oskar Haarklou Veileborg (BarrensZeppelin)
added this pull request to stack #1631
October 19, 2026 09:27
Oskar Haarklou Veileborg (BarrensZeppelin)
requested a review
from Martin Torp (mtorp)
October 19, 2026 09:29
Oskar Haarklou Veileborg (BarrensZeppelin)
marked this pull request as ready for review
October 19, 2026 09:30
Martin Torp (mtorp)
approved these changes
Oct 19, 2026
Oskar Haarklou Veileborg (BarrensZeppelin)
merged commit Oct 19, 2026
585506c
into
v1.x
11 checks passed
Oskar Haarklou Veileborg (BarrensZeppelin)
deleted the
oskar/rea-875-api-error-messages
branch
October 19, 2026 09:54
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.
sendApiRequest and queryApiSafeTextWithStatus now include the
error.messagethe Socket API returns in its error body, next to thegeneric per-status guidance they already gave. The API uses it to explain
failures the status code alone can't, such as a version spec it can't
serve.
getDefaultApiBaseUrl always falls back to the default API URL, so its
return type is now
stringand the unreachable "not configured" branchesare gone.
Part of REA-875.
Expected reviewer effort: Stamp
Stack created with GitHub Stacks CLI • Give Feedback 💬
Note
Low Risk
Localized CLI error messaging and type cleanup around API base URL; no auth or request behavior changes beyond richer failure text.
Overview
Failed Socket API calls from
sendApiRequestandqueryApiSafeTextWithStatusnow surface the server’serror.messagefrom the JSON body (when present) alongside the existing status-text, per-status guidance, and path in the errorcause, via a shareddescribeApiFailurehelper.getDefaultApiBaseUrlis typed to always return astringbecause it always falls back toAPI_V0_URL, so the removed “API not configured” error paths inqueryApiandsendApiRequestare no longer reachable.Reviewed by Cursor Bugbot for commit c0a16fb. Configure here.