public async Task <HttpResponseMessage> FormatIndex()
        {
            RavenJArray array;

            try
            {
                array = await ReadJsonArrayAsync().ConfigureAwait(false);
            }
            catch (InvalidOperationException e)
            {
                if (Log.IsDebugEnabled)
                {
                    Log.DebugException("Failed to deserialize debug request.", e);
                }
                return(GetMessageWithObject(new
                {
                    Message = "Could not understand json, please check its validity."
                }, (HttpStatusCode)422)); //http code 422 - Unprocessable entity
            }
            catch (InvalidDataException e)
            {
                if (Log.IsDebugEnabled)
                {
                    Log.DebugException("Failed to deserialize debug request.", e);
                }
                return(GetMessageWithObject(new
                {
                    e.Message
                }, (HttpStatusCode)422)); //http code 422 - Unprocessable entity
            }

            var results = new string[array.Length];

            for (int i = 0; i < array.Length; i++)
            {
                var value = array[i].Value <string>();
                try
                {
                    results[i] = IndexPrettyPrinter.FormatOrError(value);
                }
                catch (Exception e)
                {
                    results[i] = "Could not format:" + Environment.NewLine +
                                 value + Environment.NewLine + e;
                }
            }

            return(GetMessageWithObject(results));
        }