Improve parseCredentials error message

This commit is contained in:
Juan Cruz Viotti 2014-11-17 14:54:20 -04:00
parent b0fe4f41c1
commit 798a3ded61

View File

@ -31,7 +31,7 @@ exports.parseCredentials = (credentials) ->
result = credentials.split(':')
if result.length isnt 2
throw new Error('Invalid credentials')
throw new Error('Invalid credentials. The expected input is username:password.')
return {
username: _.first(result)