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

We are trying to implement Yum support for one of our plugins developed for Sonatype Nexus Repository Manager (NRM). The users set up Yum Proxy in NRM to download and install the packages Eg: yum install <package>.

Our goal is to send back and display a custom message in user’s Yum client when the user initiates installation. This custom message will be generated based on a specific criteria checked at the backend logic of the plugin.

However, the Yum client is displaying only the errorCode but not the custom message.

We tried different errorCodes as well as the debuglevel option to see if it displays additional logs. 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, "400", "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)