ShelbyTV / shelby_gt

Rails API services for Shelby GT
2 stars 0 forks source link

PUT nickname => <existing_nickname> doesn't produce error #147

Closed mkrecny closed 12 years ago

mkrecny commented 12 years ago

This is a problem in onboarding.

E.G. If I save a user with {nickname:'spinosa'} I won't be able to throw up an error saying 'Nick already taken' - the API will silently set my nickname to spinosa_2 and return a success.

cc @spinosa if you want I could check the returned obj in the success callback and if the nickname isn't equal to the desired one then throw an error .. ?

spinosa commented 12 years ago

will return a 409 CONFLICT in the case that the nickname desired is already taken