1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-12-22 14:44:21 +00:00

Throw errors occouring in SWR

This commit is contained in:
Steffo 2022-07-19 19:53:52 +02:00
parent e78532243d
commit ba531bba9b
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -48,9 +48,15 @@ export type AxiosSWRFetcherProviderProps = {
*/
export const AxiosSWRFetcherProvider = ({ children }: AxiosSWRFetcherProviderProps) => {
return (
<SWRConfig value={{ fetcher: useAxiosSWRFetcher() }}>
{children}
</SWRConfig>
<SWRConfig
value={{
fetcher: useAxiosSWRFetcher(),
onError: (error, key) => {
throw error
},
}}
children={children}
/>
)
}