-
Notifications
You must be signed in to change notification settings - Fork 151
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Sometimes I would like to handle certain responses for requests in a certain way, such as a 422 returning pop up notifications with the errors. But I don't want to do this for ALL requests, so was wondering if there was a way to pass additional options such as "metadata" which can then be checked.
const useAPIFetch = $fetch.create({
async onResponseError({ request, response, options }) {
if(options.metadata.showPopUps) {
// show popup
}
},
})Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation