Frontend Error Handling

This guideline describes how to handle errors in the frontend.

Image Loading Errors

When handling errors related to images in the frontend, follow these rules:

Actionable by User:

  • If the problem can be fixed by the user show an error toast with a clear, specific message.
    For example, if the user provides a wrong image path, the message should indicate that the image couldn't be found at the specified path and include the path itself in the message as well.

Developer Mistake:

  • If the error is due to a developer issue (e.g., missing icons, CORS issues, caching problems), log the error to the console only. Do not show a toast to the user.

Logout/Cleanup:

  • If image errors occur during logout or cleanup, suppress the error completely (no toast, no console log).

Keep error messages concise and actionable. Only show toasts when the user can do something about the error.