Bug 1653581

Summary: Give a better error for the return of user_activity API method
Product: [Community] Bugzilla Reporter: Rony Gong 🔥 <qgong>
Component: WebServiceAssignee: PnT DevOps Devs <hss-ied-bugs>
Status: CLOSED NOTABUG QA Contact: tools-bugs <tools-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 5.0CC: khong, qgong
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-18 10:23:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rony Gong 🔥 2018-11-27 07:40:26 UTC
Description of problem:
Give a better error for the return user_activity API method 
https://bz-web.host.qe.eng.pek2.redhat.com/docs/en/html/integrating/api/Bugzilla/Extension/ActivityReport/WebService.html

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


How reproducible:
100%

Steps to Reproduce:
1.Accessing the method user_activity without quotation mark to the date value
{'who':'qgong','from':2018-08-03,'to':2018-09-03, 'sort': 'bug'}
2.
3.

Actual results:
Evaluating expression '{'who':'qgong','from':2018-08-03,'to':2018-09-03, 'sort': 'bug'}' failed: SyntaxError: invalid token (<string>, line 1)

Expected results:
It should point out the invalid date format

Additional info:

Comment 1 Jeff Fearn 🐞 2018-12-03 04:01:09 UTC
Hi Rony, I can't duplicate this, are you sure it's not a client side error?

Comment 2 Rony Gong 🔥 2018-12-03 08:53:06 UTC
(In reply to Jeff Fearn from comment #1)
> Hi Rony, I can't duplicate this, are you sure it's not a client side error?

If failed if the date withou '' around:
method_name=ActivityReport.user_activity
{'Bugzilla_login':'${Login_Admin}','Bugzilla_password':'${Password_All}','who':'qgong','from':2018-08-03,'to':2018-09-03, 'sort': 'bug'}

Evaluating expression '{'Bugzilla_login':'admin1','Bugzilla_password':'1HSSQE@redhat','who':'qgong','from':2018-08-03,'to':2018-09-03, 'sort': 'bug'}' failed: SyntaxError: invalid token (<string>, line 1)



But it works if the date marked with ''
{'Bugzilla_login':'${Login_Admin}','Bugzilla_password':'${Password_All}','who':'qgong','from':2018-08-03,'to':2018-09-03, 'sort': 'bug'}

Comment 3 Jeff Fearn 🐞 2018-12-03 22:05:52 UTC
(In reply to Rony Gong from comment #2)
> (In reply to Jeff Fearn from comment #1)
> > Hi Rony, I can't duplicate this, are you sure it's not a client side error?
> 
> If failed if the date withou '' around:
> method_name=ActivityReport.user_activity
> {'Bugzilla_login':'${Login_Admin}','Bugzilla_password':'${Password_All}',
> 'who':'qgong','from':2018-08-03,'to':2018-09-03, 'sort': 'bug'}
> 
> Evaluating expression
> '{'Bugzilla_login':'admin1','Bugzilla_password':'1HSSQE@redhat',
> 'who':'qgong','from':2018-08-03,'to':2018-09-03, 'sort': 'bug'}'
> failed: SyntaxError: invalid token (<string>, line 1)
> 
> 
> 
> But it works if the date marked with ''
> {'Bugzilla_login':'${Login_Admin}','Bugzilla_password':'${Password_All}',
> 'who':'qgong','from':2018-08-03,'to':2018-09-03, 'sort': 'bug'}

This doesn't answer my question though. Can you copy the error from the Bugzilla log files?

Comment 4 Jeff Fearn 🐞 2019-03-18 10:23:54 UTC
I believe this is a client side error and the request isn't being sent to Bugzilla at all. If you can produce evidence from the Bugzilla log contradicting this then please attache it and reopen the bug.