We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63c15f4 commit cb40de1Copy full SHA for cb40de1
1 file changed
packages/kitsu-core/src/error/index.js
@@ -3,6 +3,26 @@
3
*
4
* @param {Object} E The Error
5
* @throws {Object} The mutated Error
6
+ *
7
+ * @example
8
+ * error('Hello')
9
10
11
+ * error({errors: [ { code: 400 } ]})
12
13
14
+ * error({
15
+ * response: {
16
+ * data: {
17
+ * errors: [ {
18
+ * title: 'Filter is not allowed',
19
+ * detail: 'x is not allowed',
20
+ * code: '102',
21
+ * status: '400'
22
+ * } ]
23
+ * }
24
25
+ * })
26
*/
27
export function error (E) {
28
if (E.response) {
0 commit comments