Bug 1457220 - Getting non-existent user info leads to Internal Server Error
Summary: Getting non-existent user info leads to Internal Server Error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Storage Console
Classification: Red Hat Storage
Component: API
Version: 3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3
Assignee: Nobody
QA Contact: sds-qe-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-31 11:18 UTC by Filip Balák
Modified: 2018-11-19 05:32 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-19 05:32:24 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github https://github.com/Tendrl api issues 140 0 None None None 2017-05-31 11:18:40 UTC

Description Filip Balák 2017-05-31 11:18:40 UTC
Description of problem:
When you try to call GET `hostname/api/1.0/users/invalid_user` where invalid_user is not existing user then server responds with `500 Internal Server Error`. 

Version-Release number of selected component (if applicable):
tendrl-api-3.0-alpha.2.el7scon.noarch
tendrl-commons-3.0-alpha.5.el7scon.noarch
tendrl-node-monitoring-3.0-alpha.1.el7scon.noarch
tendrl-performance-monitoring-3.0-alpha.2.el7scon.noarch
etcd-3.1.7-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Login and obtain access token
2. Call:
curl -XGET -H "Authorization: Bearer some-access-token" http://hostname/api/1.0/users/nouser
Where some-access-token is valid access token and hostname is hostname where api runs.

Actual results:
Server returns `500 Internal Server Error`.

Expected results:
Server returns `404 Not found`.

Additional info:

Comment 3 Filip Balák 2017-06-21 10:10:15 UTC
Server returns `404 Not found` as expected. --> VERIFIED
Tested with:
tendrl-alerting-3.0-alpha.4.el7scon.noarch
tendrl-api-3.0-alpha.5.el7scon.noarch
tendrl-api-httpd-3.0-alpha.5.el7scon.noarch
tendrl-commons-3.0-alpha.10.el7scon.noarch
tendrl-dashboard-3.0-alpha.5.el7scon.noarch
tendrl-node-agent-3.0-alpha.10.el7scon.noarch
tendrl-performance-monitoring-3.0-alpha.8.el7scon.noarch


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