validators/client-error/is-connection-closed-without-response.js

  1. import validateHttpStatus from '../validate-http-status';
  2. /**
  3. * @description
  4. * Validate HTTP Status code 444 type CLIENT ERROR
  5. *
  6. * @param {Integer} statusCode - The HTTP Status code
  7. * @return {Boolean}
  8. * @throws {HTTPStatusError} When the statusCode is different then 444
  9. */
  10. function isConnectionClosedWithoutResponse(statusCode) {
  11. return validateHttpStatus(statusCode, 444);
  12. }
  13. export default isConnectionClosedWithoutResponse;