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
Status: VERIFIED
Product: Red Hat Storage Console
Classification: Red Hat
Component: core (Show other bugs)
2
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 2
Assigned To: gowtham
sds-qe-bugs
:
Depends On:
Blocks:
  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:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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):
  rhscon-core-0.0.6-0.1.alpha1.el7.x86_64<F3> 

How reproducible:
  100%

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 
rhscon-ceph-0.0.29-1.el7scon.x86_64
rhscon-core-0.0.29-1.el7scon.x86_64
rhscon-ui-0.0.43-1.el7scon.noarch
and it returns
HTTP request sent, awaiting response... 401 Unauthorized
Username/Password Authentication Failed.

-->VERIFIED

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