Duplicate invite can raise cryptic messages

To repo:

  • Go to user profile -> invites
  • Invite user
  • User accepts invite
  • Try to invite user again

You are presented with the cryptic error: “You are not permitted to view the requested resource.”

Instead we should say:

@xyz is already a member of the forum.

Or something along those lines.

7 Likes

Can you add this to your list @techAPJ?

2 Likes

Fixed via:

https://github.com/discourse/discourse/commit/26ccf61ab187238ac2741f4b986279c532419de0

This error was specific to non-staff users. Now the error message will be generic:

Sorry, we couldn’t invite that person. Perhaps they have already been invited? (Invites are rate limited)

6 Likes