Page 1 of 2
My service tests out okay but fails in my app
Posted: Wed Mar 04, 2015 4:26 am
by Teri
Hello!
I am building my first app on appery.io and I've created a database with a custom collection.
Then i created a new database service in my app for listing this information. The service tests out okay (I can see the test data) and I've mapped it to a list on a page, I've also added the Invoke service to the page, but I'm just getting the javascript alert I set up to display when there is an error with the service when I test the app.
I'm sure I must be missing something! Help?
My service tests out okay but fails in my app
Posted: Wed Mar 04, 2015 6:38 am
by Illya Stepanov
Hi Teri -
What error message do you get, please show it to us?
And the mapping for the list component should look like this:
My service tests out okay but fails in my app
Posted: Wed Mar 04, 2015 1:30 pm
by Teri
Hello -
I am seeing this:
code
{"code":"DBSQ002","description":"database id not specified"}
/code
I've checked the server settings and that looks okay... I'm including a screenshot.
I dont see what is different about my mapping and yours except that I've named my list item. What am I missing?
My service tests out okay but fails in my app
Posted: Wed Mar 04, 2015 3:13 pm
by Illya Stepanov
Could you please show the exact error in the browser console with actual request, headers and response?
My service tests out okay but fails in my app
Posted: Wed Mar 04, 2015 3:23 pm
by Teri
Sure this is what I'm seeing
My service tests out okay but fails in my app
Posted: Thu Mar 05, 2015 1:10 am
by Yurii Orishchuk
Hi Teri,
As i can see you don't have "X-Appery-Database-Id" request header in your actual request.
Please check following things:
Correct "settings service" on the list service settings tab.
Details: http://prntscr.com/6ctwrb/direct
Correct headers in your request tab of the service.
Details: http://prntscr.com/6ctxbw/direct
Regards.
My service tests out okay but fails in my app
Posted: Thu Mar 05, 2015 3:21 am
by Teri
hmmm looks like they are set as expected
Other ideas?
My service tests out okay but fails in my app
Posted: Thu Mar 05, 2015 7:16 am
by Egor Kotov6832188
Hello Teri.
1) Open Fido_settings
2) Check if the database_id parameter has value
My service tests out okay but fails in my app
Posted: Thu Mar 05, 2015 1:47 pm
by Teri
Yep
My service tests out okay but fails in my app
Posted: Fri Mar 06, 2015 6:55 am
by Egor Kotov6832188
Hello Teri
Please open before send request for your service and send us a screenshot.
Check if the headers are not overridden with new value.