[okfn-labs] PyBossa-client not working anymore
Daniel Lombraña González
teleyinex at gmail.com
Fri May 17 08:59:46 UTC 2013
Hi again Egil,
I've deployed a few minutes ago some improvements in the API. Basically,
now, if an error occurs in the API request you will get a nice JSON object
with the reason (it is already now in the docs). Additionally, I've updated
pybossa-client and release version 0.4.0 which uses this new error
statements to let you know what is going on. For example, in your specific
case you were getting a 500 because of an IntegrityError or in other words
because you were trying to create an app that already exists in the DB. Now
you will get this simple and nice JSON error as a response:
{
u'status': u'failed',
u'target': u'app',
u'exception_msg': u'(IntegrityError) duplicate key value violates unique
constraint "app_name_key"\nDETAIL: Key (name)=(2Flickr Person Finder)
already exists.\n',
u'status_code': 415,
u'exception_cls':
u'IntegrityError',
u'action': u'POST'
}
If you want to start using these new features, just upgrade your
pybossa-client and check for errors in the response that you will get from
all the pbclient methods.
All the best,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/okfn-labs/attachments/20130517/b8f948a2/attachment-0002.html>
More information about the okfn-labs
mailing list