Bug 708058 - Server 500 error thrown when user autosubscribes and has no entitlements
Summary: Server 500 error thrown when user autosubscribes and has no entitlements
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: William Poteat
QA Contact: John Sefler
URL:
Whiteboard:
: 728237 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-26 16:26 UTC by Brenton Leanhardt
Modified: 2015-05-14 15:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-17 13:03:32 UTC


Attachments (Terms of Use)

Description Brenton Leanhardt 2011-05-26 16:26:02 UTC
Description of problem:
Server 500 errors are showing up in the logs when users try to autosubscribe and have no entitlements.  The symptoms are the same a other errors.  We need to have this improved so that we can properly monitoring production activity.


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

How reproducible:

Steps to Reproduce:
1.  Create a new user
2.  Login to a RHEL 6.1 machine and try to autosubscribe

Here's the command I ran in Stage:
subscription-manager register --username bleanhar_test01 --password redhat --autosubscribe --force

  
Actual results:

The following request was sent from the client to Stage:

https://subscription.rhn.stage.redhat.com/clonepin/candlepin/consumers/f511d11b-f790-4c6f-9b4d-19601d358e7f/entitlements?product=83&product=69&product=85&product=92&product=90

Candlepin returns a server 500 error.  This is in the logs:
2011-05-26 12:07:59,752 INFO  [STDOUT] May 26 12:07:59 [http-10.25.121.1-8080-4] ERROR org.fedoraproject.candlepin.exce
ptions.CandlepinExceptionMapper - Runtime exception:
org.jboss.resteasy.spi.ApplicationException: java.lang.RuntimeException: No entitlements for products: [83, 69, 85, 92,
 90]

Expected results:
A server 500 error is not what should be returned in this case.  Something in the 4xx range might be appropriate.  I could even see it returning a 200 with useful message to the client.  Right now the client silently fails (I believe there is another bug for that)


Additional info:

Comment 1 Brenton Leanhardt 2011-08-15 14:22:25 UTC
*** Bug 728237 has been marked as a duplicate of this bug. ***

Comment 2 Brenton Leanhardt 2011-08-15 14:23:51 UTC
We've seen this autosubscribe call fail 183 times this month.  Users have successfully autosubscribed 595 times during the same time period.

Comment 3 Bryan Kearney 2012-07-17 13:03:32 UTC
Marking all community bugs modified or beyong as closed.


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