rename error util

This commit is contained in:
Sara
2023-11-08 16:17:03 +01:00
parent 26330b9de2
commit 92b728363e
5 changed files with 10 additions and 10 deletions

View File

@@ -3,7 +3,7 @@ import { V1TranscriptGetRequest } from "../../api/apis/DefaultApi";
import { GetTranscript } from "../../api";
import { useError } from "../../(errors)/errorContext";
import getApi from "../../lib/getApi";
import { shouldShowGet } from "../../lib/errorUtils";
import { shouldShowError } from "../../lib/errorUtils";
type Transcript = {
response: GetTranscript | null;
@@ -36,7 +36,7 @@ const useTranscript = (
console.debug("Transcript Loaded:", result);
})
.catch((error) => {
const shouldShowHuman = shouldShowGet(error);
const shouldShowHuman = shouldShowError(error);
console.log({ ...error });
if (shouldShowHuman) {
setError(error, "There was an error loading the transcript");