Skip to content

Commit

Permalink
Set GraphQL request body error logging to the warning level and moved…
Browse files Browse the repository at this point in the history
… to the end
  • Loading branch information
xperiandri committed Mar 17, 2024
1 parent a0c464d commit a6ee3e2
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@ module HttpHandlers =
JsonSerializer.Serialize(value, jsonSerializerOptions)

match content with
| RequestError errs ->
logger.LogDebug(
$"Produced request error GraphQL response with documentId = '{{documentId}}' and metadata:{Environment.NewLine}{{metadata}}",
documentId,
metadata
)

GQLResponse.RequestError(documentId, errs)
| Direct(data, errs) ->
logger.LogDebug(
$"Produced direct GraphQL response with documentId = '{{documentId}}' and metadata:{Environment.NewLine}{{metadata}}",
Expand Down Expand Up @@ -143,6 +135,14 @@ module HttpHandlers =
))

GQLResponse.Stream documentId
| RequestError errs ->
logger.LogWarning(
$"Produced request error GraphQL response with documentId = '{{documentId}}' and metadata:{Environment.NewLine}{{metadata}}",
documentId,
metadata
)

GQLResponse.RequestError(documentId, errs)

/// Checks if the request contains a body
let checkIfHasBody (request: HttpRequest) = task {
Expand Down

0 comments on commit a6ee3e2

Please sign in to comment.