Skip to content

[bug]: post-avatar is continuously logging errors if no gravatar is found #5814

@alizedebray

Description

@alizedebray

🐞 Describe the bug

The post-avatar component is designed to display a user's Gravatar image based on their user ID or email.

However, when no Gravatar image exists for the provided ID or email, the component continuously logs errors in the console.

🛠️ To Reproduce

Steps to reproduce the behavior:

  1. Add a post-avatar component with an attribute email="[email protected]".
  2. Open the browser console.
  3. Observe repeated error messages related to the missing Gravatar image.

✨ Expected behavior

As a developer using the post-avatar component, I expect it to:

  • Attempt to fetch the Gravatar image.
  • If no Gravatar is found, gracefully fall back to displaying the user’s initials.
  • Avoid throwing or logging errors in the console when no image is available.

📷 Screenshots

Image

Metadata

Metadata

Assignees

Labels

🐞 bugSomething isn't working📦 componentsRelated to the @swisspost/design-system-components package

Type

Projects

Status

🚀 Done

Relationships

None yet

Development

No branches or pull requests

Issue actions