Skip to content

Commit

Permalink
Improve frontmatter failures by displaying the filepath being processed
Browse files Browse the repository at this point in the history
  • Loading branch information
supermario committed Sep 18, 2023
1 parent c53a4a3 commit 415095f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/BackendTask/File.elm
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ bodyWithFrontmatter frontmatterDecoder filePath =
{ title = "BackendTask.File Decoder Error"
, body =
"I encountered a Json Decoder error from a call to BackendTask.File.bodyWithFrontmatter.\n\n"
++ ("I was trying to process `" ++ filePath ++ "`.\n\n")
++ Decode.errorToString frontmatterDecodeError
}
|> FatalError.build
Expand Down Expand Up @@ -257,6 +258,7 @@ onlyFrontmatter frontmatterDecoder filePath =
{ title = "BackendTask.File Decoder Error"
, body =
"I encountered a Json Decoder error from a call to BackendTask.File.onlyFrontmatter.\n\n"
++ ("I was trying to process `" ++ filePath ++ "`.\n\n")
++ Decode.errorToString frontmatterDecodeError
}
|> FatalError.build
Expand Down

0 comments on commit 415095f

Please sign in to comment.