Skip to content

Commit 86d14e9

Browse files
Fix msgs
1 parent 184e751 commit 86d14e9

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

Diff for: Examples/MinimalWebApp/Program.fs

+7-7
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ let app configureBuilder =
8484
|> AsyncResult.mapError ValidationErrors.ofList
8585
|> AsyncResult.bind (db.Create >> AsyncResult.mapError IOError)
8686
|> AsyncResult.teeError (function
87-
| IOError (Create.DbExn e) -> logger.LogError ("A database exception occurred when trying to get the clown.", e)
88-
| IOError (Create.DbTimeout e) -> logger.LogWarning ("A database timeout occurred when trying to get the clown.", e)
87+
| IOError (Create.DbExn e) -> logger.LogError ("A database exception occurred when trying to create the clown.", e)
88+
| IOError (Create.DbTimeout e) -> logger.LogWarning ("A database timeout occurred when trying to create the clown.", e)
8989
| IOError (Create.NameConflict _) | ValidationErrors _ -> ())
9090
|> AsyncResult.foldResult
9191
(Get.Clown.toDto >> fun clown -> Results.Created ($"/api/clowns/{clown.Id}", clown))
@@ -108,9 +108,9 @@ let app configureBuilder =
108108
|> AsyncResult.mapError ValidationErrors.ofList
109109
|> AsyncResult.bind (db.Update >> AsyncResult.mapError IOError)
110110
|> AsyncResult.teeError (function
111-
| IOError (Update.DbExn e) -> logger.LogError ("A database exception occurred when trying to get the clown.", e)
112-
| IOError (Update.DbTimeout e) -> logger.LogWarning ("A database timeout occurred when trying to get the clown.", e)
113-
| IOError (Update.NotFound _) | IOError (Update.NameConflict _) | ValidationErrors _ -> ())
111+
| IOError (Update.DbExn e) -> logger.LogError ("A database exception occurred when trying to update the clown.", e)
112+
| IOError (Update.DbTimeout e) -> logger.LogWarning ("A database timeout occurred when trying to update the clown.", e)
113+
| IOError Update.NotFound | IOError (Update.NameConflict _) | ValidationErrors _ -> ())
114114
|> AsyncResult.foldResult
115115
(Get.Clown.toDto >> Results.Ok)
116116
(function
@@ -127,8 +127,8 @@ let app configureBuilder =
127127
] (fun (logger : ILogger<Program>) (db : IDataAccess) id ->
128128
db.Delete id
129129
|> AsyncResult.teeError (function
130-
| Delete.DbExn e -> logger.LogError ("A database exception occurred when trying to get the clowns.", e)
131-
| Delete.DbTimeout e -> logger.LogWarning ("A database timeout occurred when trying to get the clowns.", e))
130+
| Delete.DbExn e -> logger.LogError ("A database exception occurred when trying to delete the clown.", e)
131+
| Delete.DbTimeout e -> logger.LogWarning ("A database timeout occurred when trying to delete the clown.", e))
132132
|> AsyncResult.foldResult
133133
Results.NoContent
134134
(function

Diff for: Examples/MinimalWebAppWithControllers/Controllers/ClownsController.fs

+7-7
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ type ClownsController
6565
|> AsyncResult.mapError ValidationErrors.ofList
6666
|> AsyncResult.bind (dataAccess.Create >> AsyncResult.mapError IOError)
6767
|> AsyncResult.teeError (function
68-
| IOError (Create.DbExn e) -> logger.LogError ("A database exception occurred when trying to get the clown.", e)
69-
| IOError (Create.DbTimeout e) -> logger.LogWarning ("A database timeout occurred when trying to get the clown.", e)
68+
| IOError (Create.DbExn e) -> logger.LogError ("A database exception occurred when trying to create the clown.", e)
69+
| IOError (Create.DbTimeout e) -> logger.LogWarning ("A database timeout occurred when trying to create the clown.", e)
7070
| IOError (Create.NameConflict _) | ValidationErrors _ -> ())
7171
|> AsyncResult.foldResult
7272
(Get.Clown.toDto >> fun clown -> Results.Created ($"/api/clowns/{clown.Id}", clown))
@@ -88,9 +88,9 @@ type ClownsController
8888
|> AsyncResult.mapError ValidationErrors.ofList
8989
|> AsyncResult.bind (dataAccess.Update >> AsyncResult.mapError IOError)
9090
|> AsyncResult.teeError (function
91-
| IOError (Update.DbExn e) -> logger.LogError ("A database exception occurred when trying to get the clown.", e)
92-
| IOError (Update.DbTimeout e) -> logger.LogWarning ("A database timeout occurred when trying to get the clown.", e)
93-
| IOError (Update.NotFound _) | IOError (Update.NameConflict _) | ValidationErrors _ -> ())
91+
| IOError (Update.DbExn e) -> logger.LogError ("A database exception occurred when trying to update the clown.", e)
92+
| IOError (Update.DbTimeout e) -> logger.LogWarning ("A database timeout occurred when trying to update the clown.", e)
93+
| IOError Update.NotFound | IOError (Update.NameConflict _) | ValidationErrors _ -> ())
9494
|> AsyncResult.foldResult
9595
(Get.Clown.toDto >> Results.Ok)
9696
(function
@@ -106,8 +106,8 @@ type ClownsController
106106
member _.DeleteClown id =
107107
dataAccess.Delete id
108108
|> AsyncResult.teeError (function
109-
| Delete.DbExn e -> logger.LogError ("A database exception occurred when trying to get the clowns.", e)
110-
| Delete.DbTimeout e -> logger.LogWarning ("A database timeout occurred when trying to get the clowns.", e))
109+
| Delete.DbExn e -> logger.LogError ("A database exception occurred when trying to delete the clown.", e)
110+
| Delete.DbTimeout e -> logger.LogWarning ("A database timeout occurred when trying to delete the clown.", e))
111111
|> AsyncResult.foldResult
112112
Results.NoContent
113113
(function

0 commit comments

Comments
 (0)