Skip to content
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

fix: relay corrrelation id to end user when backend provides one #35

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

drohit-cb
Copy link
Contributor

@drohit-cb drohit-cb commented Sep 23, 2024

What changed? Why?

This PR helps fix a small bug where we were not relaying back backend correlation id to end user as part of the error message

Note To Reviwers

I have couple of more PRs coming in at which point I can bump the version and do a EOD release.

Testing

added unit tests and also tested manually

>> go run examples/ethereum/stake/main.go /Users/rohit/code/cb/staking/.coinbase_cloud_api_key_production.json 0x87Bf57c3d7B211a100ee4d00dee08435130A62fA 405fb602cbd9618681f37d3079bb494e341da80e197c2b9d38bc7ad46f11d04f
2024/09/23 13:09:30 stakeable balance: Balance { amount: '206.5928997' asset: 'Asset { networkId: 'ethereum-holesky' assetId: 'eth' contractAddress: '' decimals: '18' }' }
2024/09/23 13:09:30 error building staking operation: APIError{HttpStatusCode: 400, Code: bad_staking_request, Message: Requested stake amount 999999999999999999970270236377088 wei (ETH) is greater than available wallet balance 206592899679428624384 wei (ETH), CorrelationId: 8c7d2c3cfd845c19-SJC}

Qualified Impact

@cb-heimdall
Copy link

cb-heimdall commented Sep 23, 2024

✅ 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
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

@drohit-cb drohit-cb marked this pull request as ready for review September 23, 2024 20:11
@drohit-cb drohit-cb merged commit ad1c2f8 into master Sep 23, 2024
5 checks passed
@drohit-cb drohit-cb deleted the fix-correlation-id branch September 23, 2024 20:51
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