Skip to content
Permalink
Browse files

[doc] remove error subcodes documentation (#1460)

# Description

Temporarily deactivate error subcodes documentation (will be reintroduced once that this feature matches our quality standards)
  • Loading branch information...
scottinet committed Sep 11, 2019
1 parent 8d0d82c commit 13172275b4d7eaa256ae8a7c473f92a7340f57b4
Showing with 1 addition and 694 deletions.
  1. +1 −4 .travis.yml
  2. +0 −24 doc/1/api/essentials/errors/index.md
  3. +0 −666 doc/1/api/essentials/errors/subcodes/index.md
@@ -94,7 +94,7 @@ jobs:
- bash .ci/sonar.sh

- stage: Unit Tests & Linters
name: Documentation dead links & subcodes check
name: Documentation dead links
cache:
directories:
- $HOME/.gem/specs
@@ -108,9 +108,6 @@ jobs:
script:
- echo "Checking dead links..."
- HYDRA_MAX_CONCURRENCY=20 npm run --prefix doc/framework dead-links
- echo "Checking subcodes..."
- npm run doc-generate-subcodes -- --output $TRAVIS_BUILD_DIR/subcodes-doc-test.md
- diff $TRAVIS_BUILD_DIR/subcodes-doc-test.md $TRAVIS_BUILD_DIR/doc/1/api/essentials/errors/subcodes/index.md

# ---------------------------------------
# Integration tests
@@ -17,35 +17,11 @@ A `KuzzleError` object has the following properties:
| `status` | <pre>number</pre> | HTTP status code |
| `message` | <pre>string</pre> | Short description of the error |
| `stack` | <pre>string</pre> | (Available in development mode only) Error stack trace |
| `errorName` | <pre>string</pre> | Error full name, precising domain, subdomain and the name of the error |
| `code` | <pre>number</pre> | Error unique code |

Clients can detect the error type based on the `status` and process the error accordingly.


### errorName

The `errorName` property is a concatenation of 3 levels of precision from where your error come from.
For an `errorName` `api.auth.database_not_found`, you have `api` as domain, `auth` as subdomain and `database_not_found` as error.

You can see the full definition about Kuzzle errors [here](/core/1/api/essentials/errors/subcodes/)


---

### code

The `code` property is a concatenation of 3 codes:
- The domain code (eg. `02` for `api`).
- The subdomain code (eg. `04` for `auth`).
- The proper error code (eg. `0001` for `database_not_found`).

So a `code` `0x02040001` has `02` as domain code on 1 byte, `04` as subdomain code on 1 byte and `0001` as error code on 2 bytes.

You can see the full definition of Kuzzle API errors [here](/core/1/api/essentials/errors/subcodes/)



## Common errors

All Kuzzle requests can return one of the following errors:

0 comments on commit 1317227

Please sign in to comment.
You can’t perform that action at this time.