Remix.run Logo
deepsun 7 hours ago

I hate when tools only produce generic "TLS Handshake failed" instead of saying why exactly it failed, where is the problem.

thunky 7 hours ago | parent | next [-]

Sounds like you'd both be happy if the tool produced both.

Geezus_42 7 hours ago | parent | next [-]

Sounds to me that deepsun and I are in agreement that an error message should tell you what the actual error was.

I.E. ERROR: TLS handshake failed: <DOMAIN> certificate chain unverified

appplication 7 hours ago | parent | prev [-]

This is why stack traces exist. But I agree Java seems to not really have a culture of “make the error message helpful”, but instead preferring “make the error message minimal and factual”.

For what it’s worth, the rise of helpful error messages seems to be a relatively new phenomenon the last few years.

kitd 7 hours ago | parent | prev [-]

This is the kind of scenario that is served better by Go/C-style error values than exceptions. Error values facilitate and encourage you to log what you were doing at the precise point when an error occurs. Doing the same with exceptions idiomatically often requires an exception hierarchy or copious amounts of separate try/catches.

The difference really becomes apparent when trying to debug a customer's problem at 3am (IME).