{"size": 409, "ext": "js", "max_stars_repo_path": "src/utils/httpError.js", "max_stars_repo_name": "msevillano/edransChallenge", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/utils/httpError.js", "max_issues_repo_name": "msevillano/edransChallenge", "max_issues_repo_issues_event_min_datetime": "2020-09-07T03:22:58.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-03T22:51:47.000Z", "max_forks_repo_path": "src/utils/httpError.js", "max_forks_repo_name": "msevillano/edransChallenge", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 8, "max_forks_count": null, "avg_line_length": 31.4615384615, "max_line_length": 74, "alphanum_fraction": 0.7237163814}
/**
 * Creates an error made to match the error middleware used on the server.
 * @param {number} errorCode - Http error Code to be returned.
 * @param {string} errorMessage - Error message to be returned.
 *
 * @return {Object} - Error object instanced.
 */
export default function httpError(errorCode, errorMessage) {
  const error = new Error(errorMessage);
  error.httpCode = errorCode;
  return error;
}
