feat(#56): Address PR comments

This commit is contained in:
Josh Creek
2026-01-10 12:37:43 +00:00
parent b1b6e63b6f
commit b30be24fd5
6 changed files with 187 additions and 13 deletions
+2 -1
View File
@@ -40,7 +40,8 @@
async function readApiErrorMessage(response: Response): Promise<string> {
try {
const data = await response.json();
// Use a clone so we can still fall back to reading the original body as text.
const data = await response.clone().json();
if (data && typeof data === 'object' && 'error' in data && typeof data.error === 'string') {
return data.error;
}