bc41dae7c763f008e8773bcbe1a534d7d54808ce
hiram
  Wed Jul 10 17:07:11 2019 -0700
add error 206 Partial Content with maxItems limit reached refs #23589

diff --git src/hg/hubApi/apiUtils.c src/hg/hubApi/apiUtils.c
index 32f29cb..c31b185 100644
--- src/hg/hubApi/apiUtils.c
+++ src/hg/hubApi/apiUtils.c
@@ -15,30 +15,36 @@
 /* finish json output, potential output an error code other than 200 */
 {
 /* this is the first time any output to stdout has taken place for
  * json output, therefore, start with the appropriate header.
  */
 puts("Content-Type:application/json");
 /* potentially with an error code return in the header */
 if (errorCode)
     {
     char errString[2048];
     safef(errString, sizeof(errString), "Status: %d %s",errorCode,errorString);
     puts(errString);
     if (err429 == errorCode)
 	puts("Retry-After: 30");
     }
+else if (reachedMaxItems)
+    {
+    char errString[2048];
+    safef(errString, sizeof(errString), "Status: %d %s",err206,err206Msg);
+    puts(errString);
+    }
 puts("\n");
 
 if (debug)
     {
     char sizeString[64];
     unsigned long long vmPeak = currentVmPeak();
     sprintLongWithCommas(sizeString, vmPeak);
     jsonWriteString(jw, "vmPeak", sizeString);
     }
 
 if (measureTiming)
     {
     long nowTime = clock1000();
     long long et = nowTime - processingStart;
     jsonWriteNumber(jw, "totalTimeMs", et);