MCPcopy Index your code
hub / github.com/codeaashu/claude-code / determineErrorType

Function determineErrorType

src/components/ResumeTask.tsx:227–239  ·  view source on GitHub ↗

* Determines the type of error based on the error message

(errorMessage: string)

Source from the content-addressed store, hash-verified

225 * Determines the type of error based on the error message
226 */
227function determineErrorType(errorMessage: string): LoadErrorType {
228 const message = errorMessage.toLowerCase();
229 if (message.includes('fetch') || message.includes('network') || message.includes('timeout')) {
230 return 'network';
231 }
232 if (message.includes('auth') || message.includes('token') || message.includes('permission') || message.includes('oauth') || message.includes('not authenticated') || message.includes('/login') || message.includes('console account') || message.includes('403')) {
233 return 'auth';
234 }
235 if (message.includes('api') || message.includes('rate limit') || message.includes('500') || message.includes('529')) {
236 return 'api';
237 }
238 return 'other';
239}
240
241/**
242 * Renders error-specific troubleshooting guidance

Callers 1

ResumeTaskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected