protected Error getErrorCode ()
    {

        if ( error.equals( "Method Not Allowed" ) )
        {
            return Error.METHOD_NOT_ALLOWED;
        } else if ( error.equals( "Not Found" ) )
        {
            return Error.NOT_FOUND;
        } else if ( error.equals( "ForbiddenOperationException" ) )
        {
            if ( cause.equals( "UserMigratedException" ) )
            {
                return Error.USER_MIGRATED_EXCEPTION;
            } else
            {
                return Error.FORBIDDEN_OPERATION_EXCEPTION;
            }
        } else if ( error.equals( "IllegalArgumentException" ) )
        {
            return Error.ILLEGAL_ARGUMENT_EXCEPTION;
        } else if ( error.equals( "Unsupported Media Type" ) )
        {
            return Error.UNSUPPORTED_MEDIA_TYPE;
        } else
        {
            return Error.UNKNOWN_EXCEPTION;
        }
    }