HTTPS endpoints return different from Webhooks

Hi

I have converted over an application from using the legacy Webhooks to the new HTTPS endpoints. There were some issues documented in this post: HTTPS Endpoint can't access querystring - #3 - any news on resolution of this?

Something else came up today, that a webhook would return something like this, if not correctly authenticated…
{"error":"invalid session: error finding user for incoming webhook","error_code":"InvalidSession","link":"https://realm.mongodb.com/groups/...."}

this is consistent with other error types where the calling application could use the error_code to take corrective action.

With the new HTTPS endpoints, a failed authentication returns something like…
{"error":"user not found","link":"https://realm.mongodb.com/groups/..."}

as the no error_code has gone missing, the calling application has not reacted correctly. Is it possible to get the error_code back for HTTPS endpoints? Relying on the text of the error doesn’t look robust to me.

thanks.

Hi Simon,

as the no error_code has gone missing, the calling application has not reacted correctly. Is it possible to get the error_code back for HTTPS endpoints?

I’ve raised this with the team and it is reported and confirmed as a bug to be planned for a fix.
I’ll keep track of it and will try to update this thread when there’s an update.

There is also an improvement ticket to update the https endpoint form UI to show the function auth configuration that existed in webhooks, but I don’t have any ETA to provide.

Regards
Manny

1 Like

Thanks for looking into this Manny. Much appreciated!

2 Likes