Skip to content

Server Queries Documentation

Bowen Yu edited this page Apr 14, 2016 · 28 revisions

Error Handling

The Genotet nodejs server serves the data via JSONP. JSONP does not support fail promise. Therefore we send back error within a 200 JSONP response in case of bad request. The network connection error and timeout are handled by the fail promise. All server queries shall return corresponding JSON result (via JSONP) on success. If a query failed, an error field shall be set under the returned object, which is handled by the front-end API to display the error message.

{
  error: string // descriptive error message
}