code: public static URL getSentryApiUrl(URI sentryUri, String projectId) {
          try {
              String url = sentryUri.toString() + "api/" + projectId + "/store/";
              return new URL(url);
          } catch (MalformedURLException e) {
              throw new IllegalArgumentException("Couldn't build a valid URL from the Sentry API.", e);
          }
      }
docs: Automatically determines the URL to the HTTP API of Sentry.
  
  @param sentryUri URI of the Sentry server.
  @param projectId unique identifier of the current project.
  @return an URL to the HTTP API of Sentry.