cowprotocol / cow-sdk

CoW protocol SDK
https://docs.cow.fi/cow-protocol/reference/sdks/cow-sdk
Other
31 stars 9 forks source link

Add error transformer to add rawApiError to quote rejection #120

Closed tukantje closed 1 year ago

tukantje commented 1 year ago

In exponential backoff, not having the raw error body limits us in terms of determining when to retry or not (i.e. not knowing the status).

This change adds a transformation function and applies it to getQuote as a PoC. (And to fix https://github.com/cowprotocol/cowswap/issues/2311)

github-actions[bot] commented 1 year ago

Coverage Status

Coverage: 68.033% (-1.1%) from 69.167% when pulling cde6c484048eeed3d5f2a0b6872ae8ed1e539da4 on fix/add-error-transformer-for-status-information into 0152a356441be54649ba374102e81ec6f3689f61 on main.

github-actions[bot] commented 1 year ago

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A

Report generated by eslint-plus-action

socket-security[bot] commented 1 year ago

New dependency changes detected. Learn more about Socket for GitHub ↗︎


👍 No new dependency issues detected in pull request

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

Pull request alert summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

📊 Modified Dependency Overview:

🚮 Removed packages: @cowprotocol/cow-sdk@2.0.1