File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -163,30 +163,28 @@ set to an empty object.
163163``` js
164164export const BaseError = ModernError .subclass (' BaseError' , {
165165 plugins: [modernErrorsHttp],
166- http: { ... options } ,
166+ http: options,
167167})
168168```
169169
170170- Any error of a specific class (and its subclasses): second argument to
171171 [ ` ErrorClass.subclass() ` ] ( https://github.com/ehmicky/modern-errors#options-1 )
172172
173173``` js
174- export const AuthError = BaseError .subclass (' AuthError' , {
175- http: { ... options },
176- })
174+ export const AuthError = BaseError .subclass (' AuthError' , { http: options })
177175```
178176
179177- A specific error: second argument to
180178 [ ` new ErrorClass() ` ] ( https://github.com/ehmicky/modern-errors#options-3 )
181179
182180``` js
183- throw new AuthError (' ...' , { http: { ... options } })
181+ throw new AuthError (' ...' , { http: options })
184182```
185183
186184- A specific [ ` BaseError.httpResponse(error) ` ] ( #baseerrorhttpresponseerror ) call
187185
188186``` js
189- BaseError .httpResponse (error, { ... options } )
187+ BaseError .httpResponse (error, options)
190188```
191189
192190# Related projects
You can’t perform that action at this time.
0 commit comments