useAxios uncaught exception #3100
erdemsusam
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi ,
Even I use onError call back with execute I still get uncaught exception. My question is what is the purpose of onError if I still need to use try catch
Usage:
const {execute: deleteCon, error} = useAxios('', {method: 'DELETE'}, HTTP, { immediate: false, onSuccess: async () => { await getConnections() }, onError: (error) => { toast.add({ severity: 'error', summary: 'Connection Delete Failed', detail: error?.response?.data?.message, life: 5000 }) }, onFinish: () => { deleteConnectionDialog.value = false connection.value = {} } })
Beta Was this translation helpful? Give feedback.
All reactions