Skip to content

Commit 7b0ef2a

Browse files
committed
docs: rearrange descriptions
1 parent 80b3008 commit 7b0ef2a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ app.use(function (req, res, next) {
3535

3636
This is the current API, currently extracted from Koa and subject to change.
3737

38-
All errors inherit from JavaScript `Error` and the exported `createError.HttpError`.
39-
4038
### Error Properties
4139

4240
- `expose` - can be used to signal if `message` should be sent to the client,
@@ -52,6 +50,9 @@ All errors inherit from JavaScript `Error` and the exported `createError.HttpErr
5250

5351
### createError([status], [message], [properties])
5452

53+
Create a new error object with the given message `msg`.
54+
The error object inherits from `createError.HttpError`.
55+
5556
<!-- eslint-disable no-undef, no-unused-vars -->
5657

5758
```js
@@ -64,6 +65,9 @@ var err = createError(404, 'This video does not exist!')
6465

6566
### new createError\[code || name\](\[msg]\))
6667

68+
Create a new error object with the given message `msg`.
69+
The error object inherits from `createError.HttpError`.
70+
6771
<!-- eslint-disable no-undef, no-unused-vars -->
6872

6973
```js

0 commit comments

Comments
 (0)