Bug 602260

Summary: "No JSON object could be decoded" is not descriptive enough
Product: Red Hat Enterprise Linux 6 Reporter: James Bowes <jbowes>
Component: subscription-managerAssignee: Bryan Kearney <bkearney>
Status: CLOSED ERRATA QA Contact: wes hayutin <whayutin>
Severity: medium Docs Contact:
Priority: low    
Version: 6.1CC: bkearney, jsefler, shaines, whayutin
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:37:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 568421    

Description James Bowes 2010-06-09 13:47:21 UTC
On errors where the server is not returning json for the client to decode, the client should give some more information. perhaps the http return code, and maybe log the response body. This would help a lot during debugging, and perhaps make things clearer for customers.

Comment 2 RHEL Program Management 2010-06-09 14:13:05 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 5 Bryan Kearney 2010-06-23 15:54:28 UTC
Any runtime exception on the server side would cause no jason to be returned. Augmented the ExceptionMapper to provide a generic error message for these exceptions which should fix the client.

Comment 6 wes hayutin 2010-08-09 22:19:29 UTC
What is the generic error message, so we can check for it.
Thanks

Comment 7 Bryan Kearney 2010-09-10 16:51:11 UTC
It should say "Runtime Error....."

Comment 8 John Sefler 2010-10-18 13:39:43 UTC
Based on https://bugzilla.redhat.com/show_bug.cgi?id=639320#c0, it looks like this bug was verified with subscription-manager-0.83-1.git.26.31d0d84.fc12.i386.  However I would still like to verify today by forcing a Runtime Error, but I don't know a way to do that anymore.

Comment 9 John Sefler 2010-10-19 13:15:38 UTC
VERIFIED...
subscription-manager-0.93.0-1.git.28.1020987.fc12.i386

Last night's test automation run encountered a Runtime Error...

201010190518:44.378 - FINE: ssh root.redhat.com subscription-manager-cli subscribe --pool=ff8080812bc382e3012bc3845d7600cf 
201010190518:45.139 - FINE: Stdout:  
201010190518:45.140 - FINE: Stderr: Runtime Error java.lang.IllegalArgumentException: Entitlement #ff8080812bc382e3012bc3c8994402bf 's endDt[ff8080812bc382e3012bc383bc89007a] must equal Subscription #2011-10-18 20:00:00.0 's endDt[2011-11-18 00:00:00.0] at com.google.common.base.Preconditions.checkArgument:111
201010190518:45.141 - FINE: ExitCode: 255

Comment 10 errata-xmlrpc 2011-05-19 13:37:13 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0611.html