mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
Feature/vm detection (#137)
* initial changes for amd * wip * fix bug where transcripts were discarded * a bit of refactoring, and adding support for avmd in config verb * bug fixes
This commit is contained in:
@@ -122,7 +122,11 @@ class HttpRequestor extends BaseRequestor {
|
||||
timeout: HTTP_TIMEOUT,
|
||||
followRedirects: false
|
||||
});
|
||||
if (![200, 202, 204].includes(statusCode)) throw new Error({statusCode});
|
||||
if (![200, 202, 204].includes(statusCode)) {
|
||||
const err = new Error();
|
||||
err.statusCode = statusCode;
|
||||
throw err;
|
||||
}
|
||||
if (headers['content-type'].includes('application/json')) {
|
||||
buf = await body.json();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user