Bug 1268491 - attempts to unbind an extremely large serial number throw a Runtime Error
Summary: attempts to unbind an extremely large serial number throw a Runtime Error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 1.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Filip Nguyen
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-02 23:03 UTC by John Sefler
Modified: 2016-07-22 14:40 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-07-22 14:40:12 UTC
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2015-10-02 23:03:13 UTC
Description of problem:
I've got an automated test that attempts to unsubscribe from a very large serial number.  The response from candlepin has changed from a gracious response to a RuntimeError


Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.0.7-1    <============
subscription management rules: 5.17
subscription-manager: 1.15.9-13.el7
python-rhsm: 1.15.4-5.el7


How reproducible:


Steps to Reproduce:
[root@jsefler-7 ~]# subscription-manager unsubscribe --serial=41733001809434949198807773539209179904
Serial numbers unsuccessfully removed at the server:
   Runtime Error Unable to extract parameter from http request: javax.ws.rs.PathParam("serial") value is '41733001809434949198807773539209179904' for public void org.candlepin.resource.ConsumerResource.unbindBySerial(java.lang.String,java.lang.Long) at java.lang.NumberFormatException.forInputString:65


Actual results:
 above

Expected results:
Serial numbers unsuccessfully removed at the server:
   41733001809434949198807773539209179904 is not a valid value for serial



Additional info:

Comment 1 Filip Nguyen 2015-10-05 07:23:00 UTC
Good catch John, it seems that the recent transition to new RestEasy affected server-side error handling on our REST layer

Comment 2 Filip Nguyen 2015-10-05 08:45:15 UTC
In the past when a parameter of a JAX-RS resource was not parseable, RestEasy used to throw BadRequestException. This behavior was changed by this REST Easy commit [1]. Now it throws NotFoundException.

[1] https://github.com/resteasy/Resteasy/commit/914f119a6bb06c6abae99229096281b7ea20516f

Comment 4 Barnaby Court 2016-07-22 14:40:12 UTC
Moving to closed per the updated candlepin process for bugs that have been merged or have been taken care of.


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