{"size": 1369, "ext": "js", "max_stars_repo_path": "src/errors.js", "max_stars_repo_name": "AKobets/node-landlord-client", "max_stars_repo_stars_event_min_datetime": "2017-05-30T18:26:17.000Z", "max_stars_repo_stars_event_max_datetime": "2017-05-30T18:26:17.000Z", "max_issues_repo_path": "src/errors.js", "max_issues_repo_name": "AKobets/node-landlord-client", "max_issues_repo_issues_event_min_datetime": "2016-05-02T17:16:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-11-01T14:14:42.000Z", "max_forks_repo_path": "src/errors.js", "max_forks_repo_name": "AKobets/node-landlord-client", "max_forks_repo_forks_event_min_datetime": "2017-06-30T16:32:45.000Z", "max_forks_repo_forks_event_max_datetime": "2020-01-16T14:49:35.000Z"}
{"max_stars_count": 1, "max_issues_count": 23, "max_forks_count": 6, "avg_line_length": 26.3269230769, "max_line_length": 65, "alphanum_fraction": 0.7436084733}
'use strict';

var util = require('util');

function TenantNotFoundError(host) {
	this.name = 'TenantNotFoundError';
	this.message = 'Tenant not found for host "' + host + '"';

	Error.captureStackTrace(this, this.constructor);
}
util.inherits(TenantNotFoundError, Error);

function TenantIdNotFoundError(tenantId) {
	this.name = 'TenantIdNotFoundError';
	this.message = 'Tenant not found with id "' + tenantId + '"';

	Error.captureStackTrace(this, this.constructor);
}
util.inherits(TenantIdNotFoundError, Error);

function TenantLookupFailedError(inner, tenantId) {
	this.name = 'TenantLookupFailedError';
	this.message = 'Tenant lookup failed';
	if (tenantId) {
		this.message += ' for id "' + tenantId + '"';
	}
	this.inner = inner;

	if (inner && inner.stack) {
		this.stack = inner.stack;
	} else {
		Error.captureStackTrace(this, this.constructor);
	}
}
util.inherits(TenantLookupFailedError, Error);

function LandlordNotAvailable(host, inner) {
	this.name = 'LandlordNotAvailable';
	this.message = 'Landlord not available for host "' + host + '"';
	this.inner = inner;

	Error.captureStackTrace(this, this.constructor);
}
util.inherits(LandlordNotAvailable, Error);

module.exports = {
	TenantNotFound: TenantNotFoundError,
	TenantIdNotFound: TenantIdNotFoundError,
	TenantLookupFailed: TenantLookupFailedError,
	LandlordNotAvailable: LandlordNotAvailable
};
