@maxmind/geoip2-node
Version:
Node.js API for GeoIP2 webservice client and database reader
40 lines (39 loc) • 1.1 kB
JavaScript
export class WebServiceError extends Error {
code;
error;
url;
constructor(properties, options) {
super(properties.error, options);
this.code = properties.code;
this.error = properties.error;
if (properties.status !== undefined) {
this.status = properties.status;
}
this.url = properties.url;
}
}
WebServiceError.prototype.name = 'WebServiceError';
export class AddressNotFoundError extends Error {
constructor(message, options) {
super(message, options);
this.name = this.constructor.name;
}
}
export class BadMethodCallError extends Error {
constructor(message, options) {
super(message, options);
this.name = this.constructor.name;
}
}
export class InvalidDbBufferError extends Error {
constructor(message, options) {
super(message, options);
this.name = this.constructor.name;
}
}
export class ValueError extends Error {
constructor(message, options) {
super(message, options);
this.name = this.constructor.name;
}
}