Can't Grant Badge - Generic Error

Change to send an error from backend if the reason was not valid was done here:

I have made the change to show the corresponding message to the user here. This needs to be reviewed:
https://github.com/discourse/discourse/pull/6801

7 curtidas