diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 945c9b4..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1 +0,0 @@ -. \ No newline at end of file diff --git a/app/artists/[id]/page.tsx b/app/artists/[id]/page.tsx index 7920d3c..454827d 100644 --- a/app/artists/[id]/page.tsx +++ b/app/artists/[id]/page.tsx @@ -44,6 +44,12 @@ export default function ArtistProfilePage() { ); } + const getErrorMessage = (err: unknown): string => { + if (err instanceof Error) return err.message; + if (typeof err === 'string') return err; + return "We couldn't find the artist you're looking for."; + }; + if (error || !artist) { return (
- {error instanceof Error - ? error.message - : typeof error === 'string' - ? error - : "We couldn't find the artist you're looking for."} -
+{getErrorMessage(error)}