6eacdcdb29afdeefa7ba7a5ec1e52e13e86680f9 hiram Wed Apr 10 14:45:45 2019 -0700 better layout for selection menus and now returning errors properly refs #18869 diff --git src/hg/hubApi/dataApi.h src/hg/hubApi/dataApi.h index 8fcc7bf..a6e7e4b 100644 --- src/hg/hubApi/dataApi.h +++ src/hg/hubApi/dataApi.h @@ -44,31 +44,34 @@ extern int botDelay; boolean debug; /* can be set in URL debug=1, to turn off: debug=0 */ /* default is to list all trackDb entries, composite containers too. * This option will limit to only the actual track entries with data */ extern boolean trackLeavesOnly; /* set by CGI parameter 'trackLeavesOnly' */ /* functions in hubApi.c */ struct hubPublic *hubPublicDbLoadAll(); struct dbDb *ucscDbDb(); /* return the dbDb table as an slList */ /* functions in apiUtils.c */ -void apiErrAbort(char *format, ...); +void apiFinishOutput(int errorCode, char *errorString, struct jsonWrite *jw); +/* finish json output, potential output an error code other than 200 */ + +void apiErrAbort(int errorCode, char *errString, char *format, ...); /* Issue an error message in json format, and exit(0) */ struct jsonWrite *apiStartOutput(); /* begin json output with standard header information for all requests */ extern char *jsonTypeStrings[]; #define JSON_STRING 0 // "string", /* type 0 */ #define JSON_NUMBER 1 // "number", /* type 1 */ #define JSON_OBJECT 2 // "object", /* type 2 */ #define JSON_ARRAY 3 // "array", /* type 3 */ #define JSON_BOOLEAN 4 // "boolean", /* type 4 */ #define JSON_NULL 5 // "null" /* type 5 */ #define JSON_DOUBLE 6 // UCSC json type double /* type 6 */ int autoSqlToJsonType(char *asType);