Skip to content

Commit

Permalink
chore(release): 1.2.0 [skip ci]
Browse files Browse the repository at this point in the history
## [1.2.0](v1.1.1...v1.2.0) (2023-11-25)

### Features

* relax response error handler types ([5095993](5095993))

  Relaxes the types of response error handlers. The first argument of a response error handler is now typed as `Error` instead of `ResponseError`. Only the type changes. The value is unchanged: the object will still be a `ResponseError` unless a previous response error handler changes it. Similarly, the return value for maintained errors now expects a `value` of type `Error` instead of requiring `ResponseError`. This makes it easier to use response error handler because you can now return custom error formats without angering the TypeScript compiler.

### Bug Fixes

* only processing the first response success handler ([f4a1e06](f4a1e06))

  Fixes an issue with response success handlers where only the first handler was processed.
* processing more response error handlers after one corrected an error ([7567bc5](7567bc5))

  Fixes an issue with the processing of response error handlers where if a handler corrected the error state, retrieve would continue processing the remaining handlers. This was unintentional and neither matched the behavior of request error handlers nor the documentation for response error handlers.
* processing response success handlers in error case ([92567fb](92567fb))

  Fixes an issue with response success handlers where handlers were executed even if the network response had an error status code.
  • Loading branch information
semantic-release-bot committed Nov 25, 2023
1 parent 92567fb commit 0a3a517
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
## [1.2.0](https://github.com/kleinfreund/retrieve/compare/v1.1.1...v1.2.0) (2023-11-25)


### Features

* relax response error handler types ([5095993](https://github.com/kleinfreund/retrieve/commit/5095993f41d2fba78cfcb1cc788631cd1a5542a1))

Relaxes the types of response error handlers. The first argument of a response error handler is now typed as `Error` instead of `ResponseError`. Only the type changes. The value is unchanged: the object will still be a `ResponseError` unless a previous response error handler changes it. Similarly, the return value for maintained errors now expects a `value` of type `Error` instead of requiring `ResponseError`. This makes it easier to use response error handler because you can now return custom error formats without angering the TypeScript compiler.


### Bug Fixes

* only processing the first response success handler ([f4a1e06](https://github.com/kleinfreund/retrieve/commit/f4a1e065f2a58278850f26259468a9f1153093c1))

Fixes an issue with response success handlers where only the first handler was processed.
* processing more response error handlers after one corrected an error ([7567bc5](https://github.com/kleinfreund/retrieve/commit/7567bc549d68ef73c4bedd9db9d9b6c41d0f98b2))

Fixes an issue with the processing of response error handlers where if a handler corrected the error state, retrieve would continue processing the remaining handlers. This was unintentional and neither matched the behavior of request error handlers nor the documentation for response error handlers.
* processing response success handlers in error case ([92567fb](https://github.com/kleinfreund/retrieve/commit/92567fb4e39f070b2c85427bfcd754cfb87b2471))

Fixes an issue with response success handlers where handlers were executed even if the network response had an error status code.

## [1.1.1](https://github.com/kleinfreund/retrieve/compare/v1.1.0...v1.1.1) (2023-11-18)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "retrieve",
"version": "1.1.1",
"version": "1.2.0",
"license": "MIT",
"description": "A convenience wrapper around fetch",
"author": {
Expand Down

0 comments on commit 0a3a517

Please sign in to comment.