I’m using a (kind of) API for Duolingo, which, when an invalid username parameter is supplied, returns a 400 (Bad Request) status code and a load of HTML, which then throws an uncaught error in the API connector, in the console:
POST https://forumdemo987.bubbleapps.io/version-test/apiservice/doapicallfromserver 400 (Bad Request)
x1:98 Uncaught {statusCode: 400, message: "Error parsing data from Apiconnector2: <!DOCTYPE h…Listener("load",t.captureLoad.bind(t)),r.addEvent", _original_request: {…}, stack: "locationservice.coffee", args: {…}, …}
I would have thought this would kick off the “An unhandled error occurs” event in workflows, but it doesn’t seem to. I’ve also tried checking for when the value of the API’s response is empty with no luck. Any ideas about how to catch when this occurs so I can display an appropriate error message to the user?
Here’s a demo of the issue: https://bubble.io/page?type=page&name=api400&id=forumdemo987&tab=tabs-1