Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I believe the solution to this is to classify errors properly. Any "internal error" as in HTTP 500 Internal Error should be generating a stack trace. Most other expected errors (like your case) should not. I codified this practice in a library I created for Go called errcode [1] which is designed to attach error codes and other meta information where errors are generated.

[1] https://github.com/pingcap/errcode



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: