Hey, so i was getting an error with voting for songs, it was just reporting "Generic/Unknown HTTP Error" in the logs and on screen. So i took a look in the code and in VotingUI.cs line 155 you have an if statement that checks for network or http errors. The problem is, if this is true, it doesnt then go into the else, and then it doesnt display the nice errors you have in the switch statement at line 169.
For example, my error was that i was using a read only token. So beatsaver returned a 403 but because of the if statement on line 155, it never hits the code at line 198. Thus i get a generic error rather than "read-only token" error.
You could potentially use the below code to get the error from the content, else i think changing the if statement so it only handles network error and not http errors would work. Either way currently nothing but a 200 response will hit the switch at line 169.
Hey, so i was getting an error with voting for songs, it was just reporting "Generic/Unknown HTTP Error" in the logs and on screen. So i took a look in the code and in VotingUI.cs line 155 you have an if statement that checks for network or http errors. The problem is, if this is true, it doesnt then go into the else, and then it doesnt display the nice errors you have in the switch statement at line 169.
For example, my error was that i was using a read only token. So beatsaver returned a 403 but because of the if statement on line 155, it never hits the code at line 198. Thus i get a generic error rather than "read-only token" error.
You could potentially use the below code to get the error from the content, else i think changing the if statement so it only handles network error and not http errors would work. Either way currently nothing but a 200 response will hit the switch at line 169.
Hope this makes sense