Bug 1299468 - [API] Invalid login name/password should not return 500 Internal Server Error
[API] Invalid login name/password should not return 500 Internal Server Error
Product: Red Hat Storage Console
Classification: Red Hat
Component: core (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 2
Assigned To: gowtham
Depends On:
  Show dependency treegraph
Reported: 2016-01-18 07:46 EST by Daniel Horák
Modified: 2016-07-04 08:44 EDT (History)
3 users (show)

See Also:
Fixed In Version: rhscon-ceph-0.0.23-1.el7scon.x86_64, rhscon-core-0.0.24-1.el7scon.x86_64, rhscon-ui-0.0.39-1.el7scon.noarch
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daniel Horák 2016-01-18 07:46:52 EST
Description of problem:
  Login with invalid name or password return 500 Internal Server Error (the description is correct {"Error":"password doesn't match"}), it should return "Client Error" code - 4xx.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
* Try to login to USM API via POST request to APIURL/auth/login with invalid username or password: 
  ``{'username': 'admin', 'password': 'wrong'}``

Actual results:
  response.ok:      False
  response.reason:  Internal Server Error
  response.status:  500
  response.text:    {"Error":"password doesn't match"}

Expected results:
  Response contain status 500 - Internal Server Error, while it is a client problem, so it should return "Client Error" with code 4xx.
Comment 3 Martin Kudlej 2016-07-04 08:44:48 EDT
Tested with 
and it returns
HTTP request sent, awaiting response... 401 Unauthorized
Username/Password Authentication Failed.


Note You need to log in before you can comment on or make changes to this bug.