fixes from initial load testing

This commit is contained in:
Dave Horton
2020-02-22 15:06:01 -05:00
parent 4bd9e015b5
commit fa05b76451
8 changed files with 108 additions and 67 deletions

View File

@@ -68,7 +68,7 @@ class Requestor {
const {username, password} = typeof hook === 'object' ? hook : {};
assert.ok(url, 'Requestor:request url was not provided');
assert.ok, (['GET', 'POST'].includes(method), `Requestor:request method must be 'GET' or 'POST' not ${method}`);
assert.ok, (['GET', 'POST'].includes(method), `Requestor:request method must be 'GET' or 'POST' not ${method}`);
this.logger.debug({hook, params}, `Requestor:request ${method} ${url}`);
const startAt = process.hrtime();
@@ -79,7 +79,7 @@ class Requestor {
await this.post(url, params, this.authHeader) :
await bent(method, 'buffer', 200, 201)(url, params, basicAuth(username, password));
} catch (err) {
this.logger.info({baseUrl: this.baseUrl, url: err.statusCode},
this.logger.info({baseUrl: this.baseUrl, url: err.statusCode},
`web callback returned unexpected error code ${err.statusCode}`);
throw err;
}