Bug 1299468 - [API] Invalid login name/password should not return 500 Internal Server Error
Summary: [API] Invalid login name/password should not return 500 Internal Server Error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Storage Console
Classification: Red Hat Storage
Component: core
Version: 2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 2
Assignee: gowtham
QA Contact: sds-qe-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-18 12:46 UTC by Daniel Horák
Modified: 2018-11-19 05:31 UTC (History)
3 users (show)

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:
Clone Of:
Environment:
Last Closed: 2018-11-19 05:31:13 UTC
Embargoed:


Attachments (Terms of Use)

Description Daniel Horák 2016-01-18 12:46:52 UTC
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 12:44:48 UTC
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.