MCPcopy Create free account
hub / github.com/TryCatchLearn/Overflow / handleError

Function handleError

webapp/src/lib/util.ts:26–32  ·  view source on GitHub ↗
(error: {message: string, status: number})

Source from the content-addressed store, hash-verified

24}
25
26export function handleError(error: {message: string, status: number}) {
27 if (error.status === 500) {
28 throw error
29 } else {
30 return errorToast(error)
31 }
32}
33
34export function fuzzyTimeAgo(date: Date | string): string {
35 const now = new Date();

Callers 13

loadTagsFunction · 0.90
PageFunction · 0.90
PageFunction · 0.90
onSubmitFunction · 0.90
onSubmitFunction · 0.90
handleDeleteFunction · 0.90
handleAddVoteFunction · 0.90
handleAcceptAnswerFunction · 0.90
handleDeleteFunction · 0.90
onSubmitFunction · 0.90
EditQuestionPageFunction · 0.90
onClickFunction · 0.90

Calls 1

errorToastFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…