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

@@ -6,7 +6,7 @@ import {
import { useError } from "../../(errors)/errorContext";
import { Topic } from "./webSocketTypes";
import getApi from "../../lib/getApi";
import { shouldShowGet } from "../../lib/errorUtils";
import { shouldShowError } from "../../lib/errorUtils";
type TranscriptTopics = {
topics: Topic[] | null;
@@ -37,7 +37,7 @@ const useTopics = (protectedPath, id: string): TranscriptTopics => {
})
.catch((err) => {
setErrorState(err);
const shouldShowHuman = shouldShowGet(err);
const shouldShowHuman = shouldShowError(err);
if (shouldShowHuman) {
setError(err, "There was an error loading the topics");
} else {