MCPcopy Create free account
hub / github.com/code-forge-io/react-router-devtools / statusCode

Function statusCode

docs/app/root.tsx:126–141  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124 const { t } = useTranslation()
125 // Constrain the generic type so we don't provide a non-existent key
126 const statusCode = () => {
127 if (!isRouteErrorResponse(error)) {
128 return "500"
129 }
130 // Supported error code messages
131 switch (error.status) {
132 case 200:
133 return "200"
134 case 403:
135 return "403"
136 case 404:
137 return "404"
138 default:
139 return "500"
140 }
141 }
142 const errorStatusCode = statusCode()
143 if (errorStatusCode === "404") {
144 return (

Callers 1

ErrorBoundaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…