Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit ba1f46d

Browse files
cleanup
1 parent 24ee272 commit ba1f46d

3 files changed

Lines changed: 2 additions & 18 deletions

File tree

src/SqlStreamStore.HAL/Constants.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,6 @@ public static class Streams
4040
public const string All = "stream";
4141
public const string Metadata = "metadata";
4242
}
43-
44-
public static IReadOnlyDictionary<int, string> ReasonPhrases { get; }
45-
= new ReadOnlyDictionary<int, string>(new Dictionary<int, string>
46-
{
47-
[200] = "OK",
48-
[201] = "Created",
49-
[307] = "Moved Temporarily",
50-
[400] = "Bad Request",
51-
[404] = "Not Found",
52-
[405] = "Method Not Allowed",
53-
[409] = "Conflict"
54-
});
5543

5644
public static class ReadDirection
5745
{

src/SqlStreamStore.HAL/ExceptionHandlingMiddleware.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ private static readonly IDictionary<Type, Func<Exception, Response>> s_exception
3939
[typeof(InvalidAppendRequestException)] = ex => new Response(new HALResponse(new
4040
{
4141
type = ex.GetType().Name,
42-
title = "Bad format."
42+
title = "Bad format.",
43+
detail = ex.Message
4344
}), 400),
4445
[typeof(Exception)] = s_defaultExceptionHandler
4546
};

src/SqlStreamStore.HAL/HttpContextExtensions.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ public static async Task WriteHalResponse(this HttpContext context, Response res
3131
context.Response.Headers.Append(header.Key, header.Value);
3232
}
3333

34-
if(context.IsDelete())
35-
{
36-
return;
37-
}
38-
3934
using(var writer = new JsonTextWriter(new StreamWriter(context.Response.Body))
4035
{
4136
CloseOutput = false

0 commit comments

Comments
 (0)