Routing fails on Notehub

I restore the Notecard, then on route fails with following error:
{“status”:500,“message”:“RequestRejectedException: The request was rejected because the URL contained a potentially malicious String "//"”,“errorCode”:2,“timestamp”:1729553590666,“subscriptionErrorCode”:null,“subscriptionEntry”:null,“subscriptionValue”:null}

Any help would be greatly appreciated.

Thanks,
Raju

Hi @Raju,

What stands out to me in the error is the extra double quote here: "//"”

Can you double-check your route URL to make sure there isn’t an extraneous quote in there? Also, if you want to PM me we can discuss temporarily adding me to your project so I can see how the route is configured.

Thanks,
Rob

1 Like

Thank you, @RobLauer, for your input.

Background of the issue:

We didn’t face this issue when flashing the firmware via USB cable. However, after implementing the OTA feature with Notecard support and updating the host firmware via OTA, we started experiencing this issue, even though the configuration remains the same.

We don’t have any clear indication of where the URL is being constructed or which URL it’s referring to, but other devices are able to deliver messages successfully.

Could you please help me debug this issue? Where should we start investigating?

My assumption is that the data may have been corrupted during the transfer/processing between Notecard and Notehub, or the Notecard settings might have become corrupted.

Routing URL: https://xxxx.xxxx-xx.com:443/api/v1/[$_device_token]/telemetry

My best guess is there is an issue with the [$_device_token] environment variable placeholder you’re using. Is that the device UID or some other token you are generating/storing in Notehub? Make sure you consult this doc on using the placeholder substitution feature.

1 Like

Thank you @RobLauer . The problem has been resolved and root cause is “_device_token” environment variable missed when we were using card restore option.

J *req = NoteNewRequest(“card.restore”);
JAddBoolToObject(req, “delete”, true);
JAddBoolToObject(req, “connected”, true);

NoteRequest(req);

1 Like