UNPKG

ipfs-utils

Version:

Package to aggregate shared logic and dependencies for the IPFS ecosystem

30 lines (26 loc) 594 B
'use strict' class TimeoutError extends Error { constructor (message = 'Request timed out') { super(message) this.name = 'TimeoutError' } } exports.TimeoutError = TimeoutError class AbortError extends Error { constructor (message = 'The operation was aborted.') { super(message) this.name = 'AbortError' } } exports.AbortError = AbortError class HTTPError extends Error { /** * @param {Response} response */ constructor (response) { super(response.statusText) this.name = 'HTTPError' this.response = response } } exports.HTTPError = HTTPError