UNPKG

@open-rpc/schema-utils-js

Version:

<center> <span> <img alt="CircleCI branch" src="https://img.shields.io/circleci/project/github/open-rpc/schema-utils-js/master.svg"> <img src="https://codecov.io/gh/open-rpc/schema-utils-js/branch/master/graph/badge.svg" /> <img alt="npm" sr

24 lines (23 loc) 1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Provides an error interface for handling when a method is trying to be called but does not exist. */ var MethodRefUnexpectedError = /** @class */ (function () { /** * @param methodRef The method reference that was discovered. * @param openrpcDocument The OpenRPC document that the method was used against. */ function MethodRefUnexpectedError(methodRef, openrpcDocument) { this.methodRef = methodRef; this.openrpcDocument = openrpcDocument; this.name = "MethodRefUnexpectedError"; var msg = [ "Method Ref Unexpected Error for OpenRPC API named \"".concat(openrpcDocument.info.title, "\""), "The requested ref has not been resolved: \"".concat(methodRef, "\" not a valid dereferenced method."), ]; this.message = msg.join("\n"); } return MethodRefUnexpectedError; }()); exports.default = MethodRefUnexpectedError;