You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used interceptors.response.use to return data. When I used Promise.allSettled , it always add en empty data in my response data. The client is '@hey-api/client-axios'. See screenshot.
Reproducible example or configuration
OpenAPI specification (optional)
No response
System information (optional)
No response
The text was updated successfully, but these errors were encountered:
const response = await _axios({
...opts,
data: opts.body,
params: opts.query,
url,
});
let { data } = response;
if (opts.responseType === 'json' && opts.responseTransformer) {
data = await opts.responseTransformer(data);
}
return {
...response,
data: data ?? {},
};
Always return with data. Is there an easy way to package the response data? I want to handler the response data in a global function. But now the axios interceptors don't seem to be the right way.
Description
I used
interceptors.response.use
to return data. When I usedPromise.allSettled
, it always add en empty data in my response data. The client is '@hey-api/client-axios'. See screenshot.Reproducible example or configuration
OpenAPI specification (optional)
No response
System information (optional)
No response
The text was updated successfully, but these errors were encountered: