openplanet-nl / tmio

Issue tracker for Trackmania.io.
https://trackmania.io/
3 stars 0 forks source link

Handle notMember / 403 error when accessing private club activity #111

Open Fort-TM opened 1 week ago

Fort-TM commented 1 week ago

Issue

When opening any private club activity (e.g. this one from the ITB club), the site will display the following error:

error 403 from server: ["clubMemberRole:error-notMember"] (json: cannot unmarshal array into Go value of type nadeo.errorResponse)

Suggestion

Properly handle the error and display a more user-friendly / readable message

Screenshots

The error in question: image

davidbmaier commented 1 week ago

Had a look, this will need some deeper changes in gonadeo's error handling (which always assumes Nadeo's error messages are valid Error/Message objects when they're sometimes just string arrays) so I'll look into that later.