feat: add receipt proxy tier guard, 422 forwarding, and tests (refs #139)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Eric Gullickson
2026-02-11 11:20:58 -06:00
parent 1a6400a6bc
commit 88c2d7fbcd
4 changed files with 40 additions and 3 deletions

View File

@@ -159,7 +159,9 @@ export class OcrClient {
status: response.status,
error: errorText,
});
throw new Error(`OCR service error: ${response.status} - ${errorText}`);
const err: any = new Error(`OCR service error: ${response.status} - ${errorText}`);
err.statusCode = response.status;
throw err;
}
const result = (await response.json()) as ReceiptExtractionResponse;