Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- yield tmap(reports, function *(report) {
- debug('Sending PUT request to metering hub');
- const res = yield brequest.put({
- uri: url + '/orgs',
- headers: { 'Content-Type': 'application/json' },
- body: report
- });
- debug('Received response %s from metering hub', res.statusCode);
- if (res.statusCode !== 204) {
- edebug('Unable to put usage reports to metering hub, %s: %o',
- res.statusCode, res.body);
- // Throw response object as an exception to stop further processing
- throw res;
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement