"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const BackoffError_1 = require("./BackoffError");
class MockRequestHandler {
    async request(requestConfig) {
        if (requestConfig.action === 'fail') {
            throw new Error('Fail!');
        }
        else if (requestConfig.action === 'backoff' && !requestConfig.counter) {
            requestConfig.counter = 1;
            throw new BackoffError_1.default('back off!');
        }
        else {
            return {
                status: 'good',
            };
        }
    }
}
exports.default = MockRequestHandler;
//# sourceMappingURL=MockRequestHandler.js.map