package org.intermine.webservice.server;

/*
 * Copyright (C) 2002-2011 FlyMine
 *
 * This code may be freely distributed and modified under the
 * terms of the GNU Lesser General Public Licence.  This should
 * be distributed with the code.  See the LICENSE file for more
 * information or http://www.gnu.org/copyleft/lesser.html.
 *
 */

import org.intermine.webservice.server.output.Output;

/**
 * Http status code dictionary.
 * @author Jakub Kulaviak
 **/
public class StatusDictionary
{
    /**
     * @param statusCode status code
     * @return short description of specified status code
     */
    public static String getDescription(int statusCode) {
        switch (statusCode) {
            case Output.SC_BAD_REQUEST:
                return "There is a problem on the client side (in the browser). Bad request. ";
            case Output.SC_FORBIDDEN:
                return "Forbidden. ";
            case Output.SC_INTERNAL_SERVER_ERROR:
                return "Internal server error. ";
            case Output.SC_NO_CONTENT:
                return "Resource representation is empty. ";
            case Output.SC_NOT_FOUND:
                return "Resource not found. ";
            case Output.SC_OK:
                return "OK";
            default:
                return "";
        }
    }
}

@@ -396,19 +396,19 @@
 /**%0A * H
-ttp
+TTP
  status 
@@ -664,16 +664,33 @@
         
+String ret;%0A    %09
 switch (
@@ -766,20 +766,33 @@
  ret
-urn %22
+ = %22Bad request. 
 There 
-i
+wa
 s a 
@@ -803,59 +803,45 @@
 lem 
-on the client side (in the browser). Bad request. %22
+with your request parameters:%22; break
 ;%0A  
@@ -895,19 +895,18 @@
      ret
-urn
+ =
  %22Forbid
@@ -910,17 +910,90 @@
 bidden. 
-%22
+You do not have access to some part of this query - please log in.%22; break
 ;%0A      
@@ -1055,19 +1055,18 @@
      ret
-urn
+ =
  %22Intern
@@ -1081,19 +1081,25 @@
 r error.
- 
 %22;
+ break;
 %0A       
@@ -1141,35 +1141,34 @@
              ret
-urn
+ =
  %22Resource repre
@@ -1186,18 +1186,24 @@
 s empty.
- 
 %22
+; break
 ;%0A      
@@ -1253,19 +1253,18 @@
      ret
-urn
+ =
  %22Resour
@@ -1276,18 +1276,24 @@
 t found.
- 
 %22
+; break
 ;%0A      
@@ -1340,17 +1340,23 @@
  ret
-urn
+ =
  %22OK%22;
+ break;
 %0A   
@@ -1396,25 +1396,74 @@
  ret
-urn %22%22;%0A        %7D
+ = %22Unknown Status%22;%0A        %7D%0A    %09return statusCode + %22 %22 + ret;
 %0A   

Include the status code in the string, and nicer messages