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.
163
163
``` js
164
164
export const BaseError = ModernError .subclass (' BaseError' , {
165
165
plugins: [modernErrorsHttp],
166
- http: { ... options } ,
166
+ http: options,
167
167
})
168
168
```
169
169
170
170
- Any error of a specific class (and its subclasses): second argument to
171
171
[ ` ErrorClass.subclass() ` ] ( https://github.com/ehmicky/modern-errors#options-1 )
172
172
173
173
``` js
174
- export const AuthError = BaseError .subclass (' AuthError' , {
175
- http: { ... options },
176
- })
174
+ export const AuthError = BaseError .subclass (' AuthError' , { http: options })
177
175
```
178
176
179
177
- A specific error: second argument to
180
178
[ ` new ErrorClass() ` ] ( https://github.com/ehmicky/modern-errors#options-3 )
181
179
182
180
``` js
183
- throw new AuthError (' ...' , { http: { ... options } })
181
+ throw new AuthError (' ...' , { http: options })
184
182
```
185
183
186
184
- A specific [ ` BaseError.httpResponse(error) ` ] ( #baseerrorhttpresponseerror ) call
187
185
188
186
``` js
189
- BaseError .httpResponse (error, { ... options } )
187
+ BaseError .httpResponse (error, options)
190
188
```
191
189
192
190
# Related projects
You can’t perform that action at this time.
0 commit comments