mirror of
https://github.com/lukevella/rallly.git
synced 2025-04-28 17:56:37 +02:00
Fix silenced toast error message
This commit is contained in:
parent
6cea86ffff
commit
35159bf3a1
1 changed files with 4 additions and 7 deletions
|
@ -3,7 +3,6 @@ import "tailwindcss/tailwind.css";
|
|||
import "~/style.css";
|
||||
|
||||
import { withTRPC } from "@trpc/next";
|
||||
import axios from "axios";
|
||||
import { NextPage } from "next";
|
||||
import { AppProps } from "next/app";
|
||||
import dynamic from "next/dynamic";
|
||||
|
@ -63,12 +62,10 @@ export default withTRPC<AppRouter>({
|
|||
*/
|
||||
queryClientConfig: {
|
||||
mutationCache: new MutationCache({
|
||||
onError: (error) => {
|
||||
if (axios.isAxiosError(error) && error.response?.status === 500) {
|
||||
toast.error(
|
||||
"Uh oh! Something went wrong. The issue has been logged and we'll fix it as soon as possible. Please try again later.",
|
||||
);
|
||||
}
|
||||
onError: () => {
|
||||
toast.error(
|
||||
"Uh oh! Something went wrong. The issue has been logged and we'll fix it as soon as possible. Please try again later.",
|
||||
);
|
||||
},
|
||||
}),
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue