lib/service.js
function attemptFailEvent(request) {
    var monitoringEvent = this.apiAttemptEvent(request);
    var response = request.response;
    var error = response.error;
    if (response.httpResponse.statusCode > 299 ) {
      if (error.code) monitoringEvent.AwsException = error.code;
      if (error.message) monitoringEvent.AwsExceptionMessage = error.message;
    } else {
      if (error.code || error.name) monitoringEvent.SdkException = error.code || error.name;
      if (error.message) monitoringEvent.SdkExceptionMessage = error.message;
    }
    return monitoringEvent;
  }
function attemptFailEvent(request) {
    var monitoringEvent = this.apiAttemptEvent(request);
    var response = request.response;
    var error = response.error;
    if (response.httpResponse.statusCode > 299 ) {
      if (error.code) monitoringEvent.AwsException = error.code;
      if (error.message) monitoringEvent.AwsExceptionMessage = error.message;
    } else {
      if (error.code || error.name) monitoringEvent.SdkException = error.code || error.name;
      if (error.message) monitoringEvent.SdkExceptionMessage = error.message;
    }
    return monitoringEvent;
  }
function attemptFailEvent ( request ) { var monitoringEvent = this . apiAttemptEvent ( request ) ; var response = request . response ; var error = response . error ; if ( response . httpResponse . statusCode > 299 ) { if ( error . code ) monitoringEvent . AwsException = error . code ; if ( error . message ) monitoringEvent . AwsExceptionMessage = error . message ; } else { if ( error . code || error . name ) monitoringEvent . SdkException = error . code || error . name ; if ( error . message ) monitoringEvent . SdkExceptionMessage = error . message ; } return monitoringEvent ; }
Add metrics of failed request.
@api private
Add metrics of failed request .