MCPcopy Create free account
hub / github.com/TestSprite/testsprite-cli / localTargetError

Function localTargetError

src/lib/target-url.ts:140–152  ·  view source on GitHub ↗
(field: string, reason: string, hint?: string)

Source from the content-addressed store, hash-verified

138}
139
140function localTargetError(field: string, reason: string, hint?: string): ApiError {
141 return ApiError.fromEnvelope({
142 error: {
143 code: 'VALIDATION_ERROR',
144 message: `Field \`${field}\` is invalid: ${reason}.`,
145 nextAction: hint
146 ? hint + ' See `testsprite test run --help` for accepted values.'
147 : `See \`testsprite test run --help\` for accepted values.`,
148 requestId: 'local',
149 details: { field, reason, ...(hint ? { hint } : {}) },
150 },
151 });
152}

Callers 2

assertNotLocalFunction · 0.85
assertNotLocalIpv6Function · 0.85

Calls 1

fromEnvelopeMethod · 0.80

Tested by

no test coverage detected