Display service response error message on application as an alert.
Tried mapping to label but still can't get the error message to show.
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
Tried mapping to label but still can't get the error message to show.
Can you share the app with a href="mailto:support@tiggzi.com" rel="nofollow"support@tiggzi.com/a? Tell me exactly how to get a valid response and invalid response.
I've shared Shared.
From Tiggzi
Go to the signupScreen.
Click on Edit parsesignup service.
Test Connection and enter some info on the username and password parameter values.Try a username like temeke which is already registered to get an invalid response.
From App
Run app
Click on create account button.
Try filling in the registration form. Try a username like temeke which is already registered to get an invalid response.
I'm not sure why direct mapping is not working, it should. I'll have to test it more.
I added an error event with this code and it works:
code
var errorText = JSON.parse(jqXHR.responseText);
Tiggzi('errorlabel').text(errorText.error);
/code
Thanx Max.
Try Complete event - to check if the service is invoked.
Tried changing it to complete event, it still does not work. I am testing the app in the appery test page, would that cause an issue?
What I meant, the complete event is always invoke -after a successful invocation or an error. Did you add any debugging and saw the event being fired?
I ran in console the event is being fired. The event in this case is "not found". I have that event mapped and have tried mapping it to the local resource "error" and then adding the event to run j/s, but still no luck. I have also attached a screen shot for all the possible errors, I have added them to rest service just only mapped one but i am firing the event for the one that is mapped.
inline.png?1384747530[/img] [/url]