2.8.1 (2024-03-07)
🐛 Bug fix(es)
export const apiClient = wretch('https://localhost:3000')
.addon(QueryStringAddon)
.resolve((chain) => {
return chain.unauthorized((_error, request) => {
// request type used to be wrong (missing .query() from the addon)
// and it would clash with what was expected by the callback definition
// now the type should be correct ✨
return request
.fetch()
.unauthorized((error) => {
throw error;
})
.json();
});
});
⬆️ Version update(s)
- Bump follow-redirects from 1.15.1 to 1.15.4 (04fada6)