mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-03 12:16:04 +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 "~/style.css";
|
||||||
|
|
||||||
import { withTRPC } from "@trpc/next";
|
import { withTRPC } from "@trpc/next";
|
||||||
import axios from "axios";
|
|
||||||
import { NextPage } from "next";
|
import { NextPage } from "next";
|
||||||
import { AppProps } from "next/app";
|
import { AppProps } from "next/app";
|
||||||
import dynamic from "next/dynamic";
|
import dynamic from "next/dynamic";
|
||||||
|
@ -63,12 +62,10 @@ export default withTRPC<AppRouter>({
|
||||||
*/
|
*/
|
||||||
queryClientConfig: {
|
queryClientConfig: {
|
||||||
mutationCache: new MutationCache({
|
mutationCache: new MutationCache({
|
||||||
onError: (error) => {
|
onError: () => {
|
||||||
if (axios.isAxiosError(error) && error.response?.status === 500) {
|
|
||||||
toast.error(
|
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.",
|
"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