summaryrefslogtreecommitdiff
path: root/docs/error_reporting.rst
diff options
context:
space:
mode:
authorIb Lundgren <ib.lundgren@gmail.com>2014-10-23 18:47:57 +0100
committerIb Lundgren <ib.lundgren@gmail.com>2014-10-23 18:47:57 +0100
commitfe546f426edc95add019ca8847198f4d1eca24d6 (patch)
tree6f97377ad272f3e77107ca9ba39b0d4923cc08df /docs/error_reporting.rst
parentff4c9399172d19434c6cdd46932f4195a71742fb (diff)
downloadoauthlib-fe546f426edc95add019ca8847198f4d1eca24d6.tar.gz
Docs updates recovered from a broken git repo.
Draft release process doc to try force myself into more structured releases in the future. A few initial notes on how to report errors. Added a few common exceptions to the FAQ. Removed supported versions from feature matrix. They are all available in setup.py metadata. Move JWT tokens to grant types where it (confusingly) belongs.
Diffstat (limited to 'docs/error_reporting.rst')
-rw-r--r--docs/error_reporting.rst61
1 files changed, 61 insertions, 0 deletions
diff --git a/docs/error_reporting.rst b/docs/error_reporting.rst
new file mode 100644
index 0000000..705f447
--- /dev/null
+++ b/docs/error_reporting.rst
@@ -0,0 +1,61 @@
+Reporting bugs how-to
+=====================
+
+Bugs are reported by opening a new Github issue and you should never hesitate
+to do so. Indeed, please open an issue if the documentation is unclear, you
+think the API is unintuitive or if you just want some help using the library.
+
+OAuthLib strive to have helpful exception messages and if you run into a
+case where that is not true please let us know!
+
+When reporting bugs, especially when they are hard or impossible to reproduce,
+it is useful to include logging output. You can enable logging for all
+oauthlib modules by adding a logger to the `oauthlib` namespace.
+
+.. code-block:: python
+
+ import logging
+ import sys
+ log = logging.getLogger('oauthlib')
+ log.addHandler(logging.StreamHandler(sys.stdout))
+ log.setLevel(logging.DEBUG)
+
+If you are using a library that builds upon OAuthLib please also enable the
+logging for their modules, e.g. for `requests-oauthlib`
+
+.. code-block:: python
+
+ log = logging.getLogger('requests-oauthlib')
+ log.addHandler(logging.StreamHandler(sys.stdout))
+ log.setLevel(logging.DEBUG)
+
+Unfortunately we can't always respond quickly to issues and to help us help you
+please try and include steps to reproduce the issue. A short example can go
+far, e.g. instead of
+
+.. code-block:: python
+
+ # oauthlib crashes when trying to sign foobar urls.
+
+aim for
+
+.. code-block:: python
+
+ # OAuth 1 Clients raise a value error for the example below
+ from oauthlib.oauth1 import Client
+ client = Client('client-id')
+ headers = {'Content-Type': 'application/x-www-form-urlencoded'}
+ body = 'hello world'
+ client.sign('https://foo.bar', headers=headers, body=body)
+
+An example like this immediately tells us two things
+
+1. You might want to have the body sign but it was unclear that it needs to be
+ properly encoded first.
+
+2. You might not want the body signed but follow an example where the header was
+ provided and you were not sure if you could simply skip supplying the header.
+
+The root cause could certainly be much more complicated but in either case
+steps to reproduce allow us to speculate as to what might cause the problem and
+lower the number of round trips needed to find a solution.