MCPcopy Create free account
hub / github.com/codeaashu/claude-code / isMediaSizeError

Function isMediaSizeError

src/services/api/errors.ts:133–139  ·  view source on GitHub ↗
(raw: string)

Source from the content-addressed store, hash-verified

131 * caller short-circuits), not a false negative.
132 */
133export function isMediaSizeError(raw: string): boolean {
134 return (
135 (raw.includes('image exceeds') && raw.includes('maximum')) ||
136 (raw.includes('image dimensions exceed') && raw.includes('many-image')) ||
137 /maximum of \d+ PDF pages/.test(raw)
138 )
139}
140
141/**
142 * Message-level predicate: is this assistant message a media-size rejection?

Callers 1

isMediaSizeErrorMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected