Cocoapods does not display the custom message sent from Sonatype Nexus Repository Manager

We are trying to implement Cocoapods support for one of our plugins developed for Sonatype Nexus Repository Manager (NRM). The users set up Cocoapods Proxy in NRM to download and install the packages.
Our goal is to send back and display a custom message in user’s Cocoapods client when the user initiates installation(pod install ). This custom message will be generated based on a specific criteria checked at the backend logic of the plugin. However, the Cocoapods client is displaying only the error code but not the custom message(Cocoapods client displays the error code in an formatted way and it will not be overridden by NRM custom message).

Podfile

# platform :ios, '9.0'
source 'http://localhost:8081/repository/cocoapods-proxy/'

target 'nexus-test-swift-app' do
  use_frameworks!

  # Pods for nexus-test-swift-app
	pod 'Alamofire',  '~>  5.2'

end

Cocoapods client response

We tried different error codes as well as the debug level option(pod install --verbose) to see if it displays additional messages. But it was not successful. Is there an approach or a workaround to overcome this issue? Appreciate your thoughts and support on this. Thank you.

Below is how we are constructing the Response object from Nexus plugin:

@Singleton
public class MyConditionalRequestHandler extends ConditionalRequestHandler {
    @Override
    public Response handle(@Nonnull Context context) throws Exception {
        Builder builder = new Response.Builder();
        Response response = builder.status(new Status(true, "500", "Custom Message")).build();
        return response;
    }
}

Types:

  • org.sonatype.nexus.repository.view.handlers.ConditionalRequestHandler
  • org.sonatype.nexus.repository.view.Response
  • org.sonatype.nexus.repository.view.Status.Status(boolean successful, int code, @Nullable String message)

Two possibilities:

  1. Cocoapods doesn’t support it
  2. Jetty changed the reason phrase years ago - sendError(int, String) behavior change between 9.4.20 and 9.4.21 · Issue #4154 · eclipse/jetty.project · GitHub