Have created Error notifications after submitting a form and are working great in Plasmic studio when in preview, however when published they are not showing. Although the success notifications show up
Relevant links:
- My project: Plasmic
Have created Error notifications after submitting a form and are working great in Plasmic studio when in preview, however when published they are not showing. Although the success notifications show up
Relevant links:
Hey @ahmed_makki,
I couldn’t reproduce the issue. I tried with this setup: Plasmic
Can you send a minimal reproduction project?
@icaro_guerra Thank you for quick response. Here is a video of the issue. In plasmic studio it works but in the published version it doesn’t. Some context: The form is a login integration to Supabase. So Im inputing a non registered email and a wrong password, where it receives a response error 400 from Supabase. Next Im showing a message with notification error.
I could create a minimal reproduction of the issue but honestly a lot of interaction on submit is involved, so will do it later if nothing works.
Hey @ahmed_makki, can you try changing the integration query in the form submition interactions and publishing a new version? There seems to be a mismatch in the queries between the Studio and the Published version.
Hi @icaro_guerra, Tried changing the integration query. Removed and did a new one, but hasn’t changed in published mode. Does still work in Studio preview.
I’m trying to think deeply of what changes I made and the only thing I do remember is I changed the form format toggled simple mode to false. Not sure if it contributed to this mismatch.
Hi again @icaro_guerra, Here is a minimal reproduction project. It only contains the component and form with the issue. Plasmic
I have created a new form and on submit recreated all the interactions including the data integration. The same issue lies. It works in Studio but not in the published version here https://sincflotest.plasmic.run/
Whats supposed to happen is that you enter any wrong email or password and an error notification should show up as showed in my previous video. (e.g email@example.com and password 12345678)
Here is an image of the interactions in Studio. Specifically the 400 Invalid Grant should be invoked as shown in the second image.
I appreciate the help as its critical to show the notification or the user doesn’t experience any response.
Hey @ahmed_makki,
Thanks for your detailed example.
Analyzing the example, it seems to be on our side: there seems to be a difference when returning the HTTP error message from the data source in production and in studio.
In studio, the returned message looks like:
{
"statusCode": ...,
"__plasmicIgnoreError": ...,
"message": "..."
}
While in production it looks like:
{
"error": {
"statusCode": ...,
"__plasmicIgnoreError": ...,
"message": "..."
}
}
We will be changing the studio environment to correctly match the production environment.
This is great, I confirm its working now. Have to edit all errors in the project but it’s worth it. It now makes more sense, even past errors that were tricky to set due to error field missing in Studio are now straight forward.
Thanks @icaro_guerra for the follow ups.
Hi @icaro_guerra Is it possible to get back the project Plasmic I think somehow I deleted it, but would like to follow up with a new issue (i can create a new topic) in the same context, where the following interactions don’t invoke after the error interaction. So if its a success, they don’t invoke unless I have them before the error interaction and if its an error they don’t invoke unless i have them before the success interactions. Although all the when statements are correct.
Hello @ahmed_makki, I have restored the project.
I recommend creating a new post with the same detailed level of information of this post for your new issue.