@astrofoundry/pi-astro 0.40.12 → 0.40.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -262,8 +262,9 @@ function printAnswer(answer: Answer, source: string): number {
|
|
|
262
262
|
} catch {
|
|
263
263
|
/* non-JSON body stays text */
|
|
264
264
|
}
|
|
265
|
+
// The gate shows only stderr for a failed call, so the error carries UniFi's own message.
|
|
266
|
+
if (answer.status < 200 || answer.status >= 300) throw new ServiceError(`${source} answered ${answer.status}: ${answer.body.slice(0, 2000)}`);
|
|
265
267
|
printJson(parsed);
|
|
266
|
-
if (answer.status < 200 || answer.status >= 300) throw new ServiceError(`${source} answered ${answer.status}`);
|
|
267
268
|
return 0;
|
|
268
269
|
}
|
|
269
270
|
|