Skip to content

Commit 48c6fef

Browse files
committed
docs: Add UnsupportedResponseTypeError
1 parent 3287570 commit 48c6fef

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed

docs/api/errors/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ Noteable error types:
3232
unauthorized-client-error
3333
unauthorized-request-error
3434
unsupported-grant-type-error
35+
unsupported-response-type-error
3536

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
==============================
2+
UnsupportedResponseTypeError
3+
==============================
4+
5+
The authorization server does not supported obtaining an authorization code using this method. See :rfc:`Section 4.1.2.1 of RFC 6749 <6749#section-4.1.2.1>`.
6+
7+
::
8+
9+
const UnsupportedResponseTypeError = require('oauth2-server/lib/errors/unsupported-response-type-error');
10+
11+
--------
12+
13+
.. _UnsupportedResponseTypeError#constructor:
14+
15+
``new UnsupportedResponseTypeError(message, properties)``
16+
=========================================================
17+
18+
Instantiates an ``UnsupportedResponseTypeError``.
19+
20+
**Arguments:**
21+
22+
+-----------------------------------------------+--------------+-------------------------------------------------------------+
23+
| Name | Type | Description |
24+
+===============================================+==============+=============================================================+
25+
| [message=undefined] | String|Error | See :ref:`OAuthError#constructor`. |
26+
+-----------------------------------------------+--------------+-------------------------------------------------------------+
27+
| [properties={}] | Object | See :ref:`OAuthError#constructor`. |
28+
+-----------------------------------------------+--------------+-------------------------------------------------------------+
29+
| [properties.code=400] | Object | See :ref:`OAuthError#constructor`. |
30+
+-----------------------------------------------+--------------+-------------------------------------------------------------+
31+
| [properties.name='unsupported_response_type'] | String | The error name used in responses generated from this error. |
32+
+-----------------------------------------------+--------------+-------------------------------------------------------------+
33+
34+
**Return value:**
35+
36+
A new instance of ``UnsupportedResponseTypeError``.
37+
38+
**Remarks:**
39+
40+
::
41+
42+
const err = new UnsupportedResponseTypeError();
43+
// err.message === 'Bad Request'
44+
// err.code === 400
45+
// err.name === 'unsupported_response_type'
46+
47+
--------
48+
49+
.. _UnsupportedResponseTypeError#message:
50+
51+
``message``
52+
===========
53+
54+
See :ref:`OAuthError#message <OAuthError#message>`.
55+
56+
--------
57+
58+
.. _UnsupportedResponseTypeError#code:
59+
60+
``code``
61+
========
62+
63+
Typically ``400``. See :ref:`OAuthError#code <OAuthError#code>`.
64+
65+
--------
66+
67+
.. _UnsupportedResponseTypeError#inner:
68+
69+
``inner``
70+
=========
71+
72+
See :ref:`OAuthError#inner <OAuthError#inner>`.
73+
74+
--------
75+
76+
.. _UnsupportedResponseTypeError#name:
77+
78+
``name``
79+
========
80+
81+
Typically ``'unsupported_response_type'``. See :ref:`OAuthError#name <OAuthError#name>`.
82+

0 commit comments

Comments
 (0)