Hi @Harri_Sarsa, how do I specify different API response codes (other than 200) in the API Data editor.
In the API Integration page if an api endpoint returns any code different from 200 appgyver just throws an error. I want to be able to specify other response codes and schema like 400 and 500.
My specific use case is connecting to a Bubble backend for authentication. For the login endpoint it can return the following responses:
200 - Login was successful
400 - E.g. Wrong password or No user with the email address exists
500 - Internal bug at Bubble
I know I can merge all the different response schemas into one but appgyver is only able to process 200 responses.
However, you should be able to create a “Handle Bubble error code” flow function, that would get the Error output as an input and then output an object with the desired schema, as the status code should be in the rawError object.
I will be very grateful if you can look into this. Note that for 200 response everything works perfectly and i’m able to signup and log users in (will post a tutorial here when this issue is resolved).
What happens if you e.g. use Alert to display the whole output object in error route via ENCODE_JSON(outputs["Create record"]) formula? The data should be in outputs["Create record"].error.rawError, if not, it’s a bug.