const errorCodes = {
	MODULE_NOT_FOUND: 460,
	METHOD_NOT_FOUND: 461,
	INVALID_URL: 462,
	UNSUPPORTED_HTTP_METHOD: 463
};

function newErrorWithCode(errorCode, errorText = "") {
  let err = new Error(errorText);
  err.errorCode = errorCode;
  return err;
}

module.exports = {
	errorCodes,
	newErrorWithCode
};