code: public static Map<String, String> sanitizeException(@Nullable Throwable t)
    {
      return ImmutableMap.of(
          "error",
          t == null ? "null" : (t.getMessage() == null ? t.toString() : t.getMessage())
      );
    }
docs: Sanitize the exception as a map of "error" to information about the exception.
  
  This method explicitly suppresses the stack trace and any other logging. Any logging should be handled by the caller.
  @param t The exception to sanitize
  @return An immutable Map with a single entry which maps "error" to information about the error suitable for passing as an entity in a servlet error response.