purduehackers / passport-issuing-office

🛂 Design your passport & register for passport assembly ceremonies.
https://passports.purduehackers.com
4 stars 3 forks source link

Retry or fail when passport fails to upload to R2 #47

Open MatthewStanciu opened 2 months ago

MatthewStanciu commented 2 months ago

https://github.com/purduehackers/passport-issuing-office/blob/7c85086214d4759c4339aa7dc365844c9ad5d1f1/lib/actions.ts#L52

72.png just failed to upload, but 72-full.png succeeded. The failure of 72.png was not caught because errors are not handled.

If the request to R2 does not return 200, then it should retry once, then fail on the user's end.

Steps to close