duffelhq / duffel-api-javascript

JavaScript client library for the Duffel API
https://duffel.com/docs
MIT License
36 stars 12 forks source link

fix: specify a more precise type for DuffelError headers #910

Closed smoogly closed 7 months ago

smoogly commented 7 months ago

Client creates DuffelError with headers directly passed from fetch. Even though headers satisfy Record<string, string>, that type isn't usable in practice for consumers of the library, e.g. when checking rate limit headers, — Headers is more precise.