Bug 1653581 - Give a better error for the return of user_activity API method
Summary: Give a better error for the return of user_activity API method
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Bugzilla
Classification: Community
Component: WebService
Version: 5.0
Hardware: Unspecified
OS: Unspecified
unspecified
low vote
Target Milestone: ---
Assignee: PnT DevOps Devs
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-27 07:40 UTC by Rony Gong 🔥
Modified: 2019-03-18 10:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-18 10:23:54 UTC


Attachments (Terms of Use)

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@redhat.com','from':2018-08-03,'to':2018-09-03, 'sort': 'bug'}
2.
3.

Actual results:
Evaluating expression '{'who':'qgong@redhat.com','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@redhat.com','from':2018-08-03,'to':2018-09-03, 'sort': 'bug'}

Evaluating expression '{'Bugzilla_login':'admin1@redhat.com','Bugzilla_password':'1HSSQE@redhat','who':'qgong@redhat.com','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@redhat.com','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@redhat.com','from':2018-08-03,'to':2018-09-03, 'sort': 'bug'}
> 
> Evaluating expression
> '{'Bugzilla_login':'admin1@redhat.com','Bugzilla_password':'1HSSQE@redhat',
> 'who':'qgong@redhat.com','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@redhat.com','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.


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