added a new RequestTypeError class that connectionClasses can throw to prevent a request from being retried and respond directly to the user.
This commit is contained in:
@ -180,6 +180,12 @@ Transport.prototype.request = function (params, cb) {
|
||||
|
||||
requestAborter = void 0;
|
||||
|
||||
if (err instanceof errors.RequestTypeError) {
|
||||
self.log.error('Connection refused to execute the request', err);
|
||||
respond(err, body, status, headers);
|
||||
return;
|
||||
}
|
||||
|
||||
if (err) {
|
||||
connection.setStatus('dead');
|
||||
if (remainingRetries) {
|
||||
|
||||
Reference in New Issue
Block a user