Collin Mann
Posts: 0
Joined: Sun Dec 29, 2013 12:50 am

200 level successful error saying that my Database Id is incorrect when trying grab the HTML that my custom server scrip

My custom server script is working fine when I test it on the test tab on the server. It returns exactly what I expected and wanted, but when I try and test the same service with exact same parameters and exact same values for those parameters, this error is thrown by my custom server script, "message: Database name must be defined.ncode: DBSQ10."

When I searched for that code, there was absolutely no information on google or on this forum. It's pretty obvious that it is saying my database name is not defined, which would mean that the parameter name that I was sending as a request did not match the parameter name that I was request.get() "ing" in my custom server script, but they do. And I've spent hours on this trying to alter different things to make it work. When I type in the wrong parameter purposefully on the server test tab, I ALSO get the same error, but the parameters are not incorrect, so it's not making much sense. I also changed the database name of the parameter multiple times to make sure that they were matching, but to no avail. Is there something I'm missing here?

I added pictures of both test pages as well as the code of my custom server script. Image Image Image Image

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

200 level successful error saying that my Database Id is incorrect when trying grab the HTML that my custom server scrip

Hi Collin,

Do you pass X-Appery-Database-Id and X-Appery-Session-Token as header parameters?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

200 level successful error saying that my Database Id is incorrect when trying grab the HTML that my custom server scrip

Hello! Please post screenshots from service settings and request parameters tab.

Collin Mann
Posts: 0
Joined: Sun Dec 29, 2013 12:50 am

200 level successful error saying that my Database Id is incorrect when trying grab the HTML that my custom server scrip

Basically, regardless of what I type in the parameters (even if I pass the script nothing or everything) I get the same error 200 code message. It's got to be something wrong with my script I assume. I've tried the settings on both none and with GreekbaseDB, but I assume the settings really don't matter unless you're trying to pass a parameter from them, such as the DB ID, but even when I tried it with the {database_id} param from the GreekbaseDB settings, with the GreekbaseDB settings enabled, I got the same message.
Image Image Image Image

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

200 level successful error saying that my Database Id is incorrect when trying grab the HTML that my custom server scrip

Please uncheck Header in Service settings for parameters X-Appery-Database-Id and X-Appery-Session-Token

Collin Mann
Posts: 0
Joined: Sun Dec 29, 2013 12:50 am

200 level successful error saying that my Database Id is incorrect when trying grab the HTML that my custom server scrip

You're awesome!! Thank you, that worked. Can you explain to me why I do not use headers for the script? Is it because the script is an intermediary before hitting the database?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

200 level successful error saying that my Database Id is incorrect when trying grab the HTML that my custom server scrip

Hello! In server script you receive DB_id and token through request.get and this function doesn't receive data from headers.

Return to “Issues”