Can the Status Text response from from NIP be changed

Is it possible to the same text status for NIPs as we do for IPs? For Non-existent Items we get the following response:

Received CLOSED msg for RIC [invalidItem]. This RIC is closed.
[Wed Jan 22 14:12:40.898] Closed Status Received. Item:<invalidItem> (Text: "F10: Not In Cache")

The Subscribing application will then retry, as there can be many subscribing apps, this can put unnecessary load on the NIP


On an Interactive feed for non-existent items the status is:


Received CLOSED msg for RIC [invalidItem]. This RIC is closed.
[Wed Jan 22 14:21:46.050] Closed Status Received. Item:<invalidItem> (Text: "The record could not be found")


Is it possible to ge the "Record could not be found" text status or is this a limitation with how NIPs work?

Best Answer

  • Hi @julian.octave

    One further point, it is generally not advisable for application to act on the contents of the text message - as these could change over time - potentially causing issues with the application.

    It is upto the consumer to not retry 'CLOSED' status items unless they are almost certain the situation is transient and the RIC should be available momentarily.

Answers

  • Hi @julian.octave, As you are aware, the items published by NIP are cached by the TREP infrastructure - which handles sending image/updates and status messages to subscribers, vs IP which handles all the subscription requests, caching and generates its own status message.

    The NIP text is coming from TREP, which does not have the item in cache. This message can not be changed.

  • @anton.goldenfarb - Got these Answers, just wanted to loop you in