question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parse errors are difficult to read

See original GitHub issue

We should be able to do better:

scala> HttpVersion.fromString("blech")
res1: org.http4s.ParseResult[org.http4s.HttpVersion] = Left(org.http4s.ParseFailure: HTTP version: Error(0,NonEmptyList(OneOfStr(0,List(HTTP/)))))

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
johnynekcommented, Nov 6, 2021

It would be nice to have a prettier rendering, but for programming language applications you probably want to control that.

I would make sure you look at LocationMap which at least will compute line/col for you, and can fetch lines so you can show a context to users.

1reaction
rossabakercommented, Sep 28, 2021

We can do it here, but if it’s not HTTP specific, it might be contributable back to cats-parse.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Parse Error: What It Is and How to Fix It - Lifewire
A parse error is an error message you sometimes get on Android devices when an app fails to install. The message itself is...
Read more >
What is a parse error? - Quora
A parse error in a piece of computer code, also known as a syntax error, prevents your program from compiling. Parse errors happen...
Read more >
Parse error when reading - Stack Overflow
GHC can't derive Read or Show for complicated GADTs, so I attempted to define custom instances below that satisfy read . show ==...
Read more >
Formula Parse Errors: What They Are & How to Fix Them
A formula parse error happens when you enter a formula into a cell, and the spreadsheet software cannot understand what you want it...
Read more >
What to do when getting parsing errors in Python? - Smartproxy
Common Python syntax errors · Missing the semicolon · Misusing the assignment operator · Using parentheses, brackets, and quotes · Missing the comma....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found