YBogomolov / fetcher-ts

Type-safe wrapper around Fetch API
MIT License
131 stars 9 forks source link

Unwanted call for handler in case of failing io-ts codec #18

Open Lonli-Lokli opened 2 years ago

Lonli-Lokli commented 2 years ago

https://github.com/YBogomolov/fetcher-ts/blob/develop/src/fetcher.ts#L167

Handler is called for error case which seems incorrect as for me 1) handler usually expecting to get completely valid object, while it might be null or something invalid 2) usually it will break the code and original io-ts will be lost with catched 'Handler side error, details' error