@@ -84,7 +84,7 @@ Plugin object to
8484
8585_ Return value_ : ` HttpResponse `
8686
87- Convert ` error ` to a plain object to use in an HTTP response. Its shape follows
87+ Converts ` error ` to a plain object to use in an HTTP response. Its shape follows
8888[ RFC 7807] ( https://www.rfc-editor.org/rfc/rfc7807 ) ("problem details").
8989
9090## Options
@@ -97,7 +97,7 @@ _Type_: `urlString`\
9797_ Default_ : ` undefined `
9898
9999URI identifying and documenting the error class. Ideally, each error class
100- [ should set one] ( https://github.com/ehmicky/modern-errors/README.md#plugin-options ) .
100+ [ should set one] ( #configuration ) .
101101
102102### status
103103
@@ -162,28 +162,26 @@ export const SharedError = AnyError.subclass('SharedError', {
162162 http: { ... options },
163163})
164164
165- export const InputError = SharedError .subclass (' InputError' )
166165export const AuthError = SharedError .subclass (' AuthError' )
166+ export const InputError = SharedError .subclass (' InputError' )
167167```
168168
169169- Any error of a specific class: second argument to
170170 [ ` AnyError.subclass() ` ] ( https://github.com/ehmicky/modern-errors#anyerrorsubclassname-options )
171171
172172``` js
173- export const InputError = AnyError .subclass (' InputError ' , {
173+ export const AuthError = AnyError .subclass (' AuthError ' , {
174174 http: { ... options },
175175})
176176```
177177
178178- A specific error: second argument to the error's constructor
179179
180180``` js
181- throw new InputError (' ...' , { http: { ... options } })
181+ throw new AuthError (' ...' , { http: { ... options } })
182182```
183183
184- - A specific
185- [ ` error.httpResponse() ` ] ( https://github.com/ehmicky/modern-errors#errorhttpresponse )
186- call
184+ - A specific [ ` error.httpResponse() ` ] ( #errorhttpresponse ) call
187185
188186``` js
189187error .httpResponse (... args, { ... options })
0 commit comments