Giter Club home page Giter Club logo

Comments (3)

sylvestre avatar sylvestre commented on July 30, 2024

FWIW, we moved to api key but this is still a private information.

from bugbot.

anubnair avatar anubnair commented on July 30, 2024

@sylvestre: I have started working on it. A sample error while parsing invalid api key:

Traceback (most recent call last):
File "test.py", line 21, in
buglist = bmo.get_bug_list(options)
File "/home/bztools/bugzilla/agents.py", line 34, in get_bug_list
print "(", BugSearch.get(url).bugs
File "/usr/local/lib/python2.7/dist-packages/remoteobjects/fields.py", line 141, in get
value = obj.api_data[self.api_name]
File "/usr/local/lib/python2.7/dist-packages/remoteobjects/promise.py", line 136, in _get_api_data
self.deliver()
File "/usr/local/lib/python2.7/dist-packages/remoteobjects/promise.py", line 216, in deliver
self.update_from_response(request['uri'], response, content)
File "/usr/local/lib/python2.7/dist-packages/remoteobjects/promise.py", line 232, in update_from_response
super(PromiseObject, self).update_from_response(url, response, content)
File "/usr/local/lib/python2.7/dist-packages/remoteobjects/http.py", line 263, in update_from_response
self.raise_for_response(url, response, content)
File "/usr/local/lib/python2.7/dist-packages/remoteobjects/http.py", line 214, in raise_for_response
% (response.status, response.reason, classname, url))

remoteobjects.http.RequestError: 400 Bad Request requesting BugSearch https://bugzilla.mozilla.org/bzapi/bug/?&changed_before=2010-12-26&product=Core,Firefox&changed_field=status&changed_after=2010-12-24&include_fields=_default,attachments&changed_field_to=RESOLVED&api_key=**********&resolution=FIXED

Now we are not handling exceptions properly. Thats why we are getting something like this.

2 ways we can avoid logging and screen output:

  1. Mask the api key(replace with ****) similar to:

Remoteobjects.http.RequestError: 400 Bad Request requesting BugSearch https://bugzilla.mozilla.org/bzapi/bug/?&changed_before=2010-12-26&product=Core,Firefox&changed_field=status&changed_after=2010-12-24&include_fields=_default,attachments&changed_field_to=RESOLVED&api_key=**********&resolution=FIXED

  1. We don't need to give url Just print the error similar to:
    "400 Bad Request requesting BugSearch "

let me know which one so that I can do the changes.

from bugbot.

sylvestre avatar sylvestre commented on July 30, 2024

Fixed by #35

from bugbot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.