API Invitations #create: Handle error response

DRY, fixes #3… I hope so.