code: func ProblemDetailsToStatusCode(prob *ProblemDetails) int {
  	if prob.HTTPStatus != 0 {
  		return prob.HTTPStatus
  	}
  	switch prob.Type {
  	case
  		ConnectionProblem,
  		MalformedProblem,
  		BadSignatureAlgorithmProblem,
  		BadPublicKeyProblem,
  		TLSProblem,
  		UnknownHostProblem,
  		BadNonceProblem,
  		InvalidEmailProblem,
  		RejectedIdentifierProblem,
  		AccountDoesNotExistProblem:
  		return http.StatusBadRequest
  	case ServerInternalProblem:
  		return http.StatusInternalServerError
  	case
  		UnauthorizedProblem,
  		CAAProblem:
  		return http.StatusForbidden
  	case RateLimitedProblem:
  		return statusTooManyRequests
  	default:
  		return http.StatusInternalServerError
  	}
  }
docs: // ProblemDetailsToStatusCode inspects the given ProblemDetails to figure out
  // what HTTP status code it should represent. It should only be used by the WFE
  // but is included in this package because of its reliance on ProblemTypes.