MCPcopy Create free account
hub / github.com/OpenPipe/OpenPipe / maybeReportError

Function maybeReportError

app/src/utils/errorHandling/maybeReportError.ts:8–20  ·  view source on GitHub ↗
(response: SuccessType<T> | ErrorType)

Source from the content-addressed store, hash-verified

6
7// Used client-side to report generic errors
8export function maybeReportError<T>(response: SuccessType<T> | ErrorType): response is ErrorType {
9 if (response.status === "error") {
10 toast({
11 description: response.message,
12 status: "error",
13 duration: 5000,
14 isClosable: true,
15 });
16 return true;
17 }
18
19 return false;
20}

Callers 15

ProjectUserTableFunction · 0.90
UpdateOpenaiApiKeyModalFunction · 0.90
InviteProjectUserModalFunction · 0.90
AddToDatasetModalFunction · 0.90
SettingsFunction · 0.90
DeleteEvalDialogFunction · 0.90
DatasetEntriesTableFunction · 0.90
FineTuneModalFunction · 0.90
RemoveSourceDialogFunction · 0.90
RelabelArchiveDialogFunction · 0.90
AddEvalModalFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected