Skip to content

fix: ensure name is a string before calling replace in getError#826

Open
rmdes wants to merge 1 commit intogetindiekit:mainfrom
rmdes:fix/getError-string-check-clean
Open

fix: ensure name is a string before calling replace in getError#826
rmdes wants to merge 1 commit intogetindiekit:mainfrom
rmdes:fix/getError-string-check-clean

Conversation

@rmdes
Copy link

@rmdes rmdes commented Jan 31, 2026

Summary

Prevents "name.replace is not a function" error when the code passed to IndiekitError is not a string (e.g., when response.statusText is undefined in some edge cases).

Changes

  • Added a type check to ensure name is a string before calling .replace() in getError()

Test

This is a defensive fix - the error was encountered in production when certain HTTP responses had undefined statusText.


Co-Authored-By: Claude Opus 4.5 [email protected]

Prevents "name.replace is not a function" error when code passed to
IndiekitError is not a string (e.g., when response.statusText is
undefined in some edge cases)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant