Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/keychain/src/utils/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,15 @@ function parseGraphQLErrorMessage(
summary: description || "Internal server error",
details,
};
} else if (code === "FailedPrecondition") {
// Extract human-readable message from wrapped API errors
// e.g., "coinbase API error [...] (correlation: ...): The user has reached..."
const humanMatch = description.match(/\):\s*(.+)/);
return {
raw: raw || message,
summary: humanMatch ? humanMatch[1] : description,
details,
};
} else {
return {
raw: raw || message,
Expand Down
Loading