pingdotgg / uploadthing

File uploads for modern web devs
https://uploadthing.com
MIT License
3.74k stars 267 forks source link

[refactor]: better error logging #781

Open juliusmarminge opened 2 months ago

juliusmarminge commented 2 months ago

I understand that this issue may be closed if it should be filed in another category

My issue

This doesn't really log any info about the error: CleanShot 2024-04-30 at 13 13 52@2x

For example, our FetchError class has input, error and data attributes on it, none of which are logged.

We should also use spans to get a better stack trace, essentially any of these logs shouldn't be necessary. If we have spans we should be able to just let the error bubble and log it once in a central place: CleanShot 2024-04-30 at 13 15 46@2x