diff --git a/product.ts b/product.ts index 56d7c34..2fd2a7f 100644 --- a/product.ts +++ b/product.ts @@ -73,7 +73,10 @@ export async function getProductos( }, } ); - const json: ProductosResponse = await res.json(); + const json = await res.json(); console.debug(json); + if (json.Message) { + throw new Error(`Tango: ${json.Message}`); + } return json; }