Skip to content

fix(typescript): Log response body for unexpected non-OAPI error scenarios #191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 11, 2025

Conversation

derek-cb
Copy link
Contributor

@derek-cb derek-cb commented Jun 10, 2025

Description

Log response body in the errorMessage for unexpected non-OAPI error scenarios.

Before:

  statusCode: 400,
  errorType: 'unexpected_error',
  errorMessage: 'An unexpected error occurred.',
  correlationId: undefined,
  errorLink: 'https://docs.cdp.coinbase.com/api-v2/docs/errors',
  [cause]: undefined

After:

  statusCode: 400,
  errorType: 'unexpected_error',
  errorMessage: 'An unexpected error occurred: "<html>\\r\\n<head><title>400 Request Header Or Cookie Too Large</title></head>\\r\\n<body>\\r\\n<center><h1>400 Bad Request</h1></center>\\r\\n<center>Request Header Or Cookie Too Large</center>\\r\\n</body>\\r\\n</html>\\r\\n"',
  correlationId: undefined,
  errorLink: 'https://docs.cdp.coinbase.com/api-v2/docs/errors',
  [cause]: undefined

Tests

Checklist

A couple of things to include in your PR for completeness:

@cb-heimdall
Copy link

cb-heimdall commented Jun 10, 2025

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@derek-cb derek-cb changed the title chore: Log response body for unexpected non-OAPI error scenarios fix(typescript): Log response body for unexpected non-OAPI error scenarios Jun 10, 2025
@derek-cb derek-cb marked this pull request as ready for review June 10, 2025 19:17
@0xRAG 0xRAG merged commit 334cc47 into main Jun 11, 2025
41 of 44 checks passed
@0xRAG 0xRAG deleted the derek/dump-error-body branch June 11, 2025 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants