Shelf-nu / shelf.nu

shelf is open source Asset Management Infrastructure for absolutely everyone.
https://shelf.nu
GNU Affero General Public License v3.0
1.65k stars 145 forks source link

[Bug]: Asset not found error gets captured 2 times for each instance #1103

Open DonKoko opened 1 week ago

DonKoko commented 1 week ago

Contact Details

No response

What happened?

Steps to reproduce:

  1. Go to any 404 asset link. For example: http://localhost:3000/assets/ewqrewr/overview
  2. See errors in terminal
  3. See errors in Sentry

So in this flow we have the following routes:

So when the user goes to a broken non-existing asset url, both those routes run. Each route tries to find the asset and fails and throws an error. Then we see 2 different errors in Sentry and in the terminal, even tho they are related to the same instance.

What is the expected behaviour?

Throw the error just 1 time.

I am wondering if switching to single fetch will resolve this. IMO it should.

DonKoko commented 1 week ago

hey @rphlmr. Do you have any idea how we can handle this, before we switch to single fetch?