mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-29 21:13:21 +00:00
13 lines
335 B
JavaScript
13 lines
335 B
JavaScript
import hasProperty from './hasProperty.js'
|
|
|
|
class ErrorWithCause extends Error {
|
|
constructor (message, options = {}) {
|
|
super(message)
|
|
this.cause = options.cause
|
|
if (this.cause && hasProperty(this.cause, 'isNetworkError')) {
|
|
this.isNetworkError = this.cause.isNetworkError
|
|
}
|
|
}
|
|
}
|
|
|
|
export default ErrorWithCause
|