MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / fingerprintError

Function fingerprintError

scripts/lint-storyboard-response-schema.cjs:205–218  ·  view source on GitHub ↗
(err)

Source from the content-addressed store, hash-verified

203}
204
205function fingerprintError(err) {
206 const path_ = err.path || '/';
207 const kw = err.keyword;
208 let detail = '';
209 if (err.params && typeof err.params === 'object') {
210 if (err.params.missingProperty) detail = `:${err.params.missingProperty}`;
211 else if (err.params.additionalProperty) detail = `:${err.params.additionalProperty}`;
212 else if (typeof err.params.allowedValue !== 'undefined') detail = `:${serializeDetail(err.params.allowedValue)}`;
213 else if (typeof err.params.type !== 'undefined') detail = `:${err.params.type}`;
214 else if (typeof err.params.format !== 'undefined') detail = `:${err.params.format}`;
215 else if (typeof err.params.limit !== 'undefined') detail = `:${err.params.limit}`;
216 }
217 return `${kw}@${path_}${detail}`;
218}
219
220function entryKey(file, phaseId, stepId) {
221 const rel = path.relative(STORYBOARD_DIR, file);

Calls 1

serializeDetailFunction · 0.70

Tested by

no test coverage detected