Skip to content

PRXT - fix: add primary error callback to fallback image#1408

Closed
punk6529 wants to merge 1 commit intomainfrom
codex/replace-console.log-with-onprimaryerror-callback
Closed

PRXT - fix: add primary error callback to fallback image#1408
punk6529 wants to merge 1 commit intomainfrom
codex/replace-console.log-with-onprimaryerror-callback

Conversation

@punk6529
Copy link
Copy Markdown
Contributor

Summary

  • replace the FallbackImage console.log with a new optional onPrimaryError callback so consumers can react when the primary source fails without emitting console output
  • ensure the component keeps working by resetting state on source changes and guard the fallback branch via the callback
  • add a Jest test that confirms the component swaps to the fallback image and triggers the callback without logging to the console

Testing

  • BASE_ENDPOINT=https://www.6529.io npx jest tests/components/common/FallbackImage.test.tsx --runInBand --coverage=false
  • npm run lint (fails: repository already has numerous pre-existing lint warnings)
  • npm run type-check (fails: repository already has many pre-existing type errors)

https://chatgpt.com/codex/tasks/task_e_68c93fea8f008321887699a6795f3e0b

Signed-off-by: ChatGPT <0+chatgpt@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

@prxt6529 prxt6529 changed the title fix: add primary error callback to fallback image PRXT - fix: add primary error callback to fallback image Oct 7, 2025
@prxt6529
Copy link
Copy Markdown
Collaborator

prxt6529 commented Oct 7, 2025

Will be done in #1516

@prxt6529 prxt6529 closed this Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants