code: func ProblemDetailsForError(err error, msg string) *probs.ProblemDetails {
  	switch e := err.(type) {
  	case *probs.ProblemDetails:
  		return e
  	case *berrors.BoulderError:
  		return problemDetailsForBoulderError(e, msg)
  	default:
  		// Internal server error messages may include sensitive data, so we do
  		// not include it.
  		return probs.ServerInternal(msg)
  	}
  }
docs: // problemDetailsForError turns an error into a ProblemDetails with the special
  // case of returning the same error back if its already a ProblemDetails. If the
  // error is of an type unknown to ProblemDetailsForError, it will return a
  // ServerInternal ProblemDetails.