Skip to content

v2.6.0

Compare
Choose a tag to compare
@MattCCC MattCCC released this 08 Aug 20:49
· 255 commits to master since this release

Features:

  • Improve error logging by adding request URL when error is thrown
  • New error handling strategy "softFail" - will return response object with additional "error" and other data in one object, without throwing (no try-catch required)
    Note that data and error can exist at the same time. So the UI can display the existing data, while knowing the upcoming request has failed.
  • added headers processing from native fetch() responses into simple objects
  • performance: optimized typings for api in createApiFetcher()
  • added types to output responses
  • parse withCredentials from axios when using native fetch()

Docs:

  • More detailed explanation of API and features
  • Added 1 more example with multiple API baseURLs
  • Added Vue integration example

Fixes:

  • When timeout passed is 0 then do not abort the requests

Breaking:

  • Deprecated RequestErrorHandler class - use onError interceptor (global or local per-request) directly instead

What's Changed

Full Changelog: v2.5.0...v2.6.0