{"repo":"ladjs/koa-better-error-handler","free":true,"listed":false,"github":"https://github.com/ladjs/koa-better-error-handler","clone":"git clone https://github.com/ladjs/koa-better-error-handler.git","description":"A better error-handler for Lad and Koa. Makes `ctx.throw` awesome (best used with koa-404-handler)","language":"JavaScript","stars":57,"topics":["node","error","handler","error-handling","error-handler","flash-messages","flash","messages","boom","validation"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"koa-better-error-handler A better error-handler for [Lad][] and [Koa][]. Makes ctx.throw awesome (best used with [koa-404-handler][]) Index Features Install Usage API Web App User-Friendly Responses HTML Error Lists License Features Detects Node.js DNS errors (e.g. ETIMEOUT and EBADFAMILY ) and sends 408 Client Timeout error Detects Mongoose errors and sends 408 Client Timeout error Detects common programmer mistakes by detecting errors of TypeError, SyntaxError, ReferenceError, RangeError, URIError, and EvalError and yields generic \"Internal Server Error\" (only applies to production mode) Detects Redis errors (e.g. ioredis' MaxRetriesPerRequestError) and sends 408 Client Timeout error Uses [Boom][boom] for making error messages beautiful (see User Friendly Responses below) Simply a better error handler (doesn't remove all headers [like the built-in one does][gh-issue]) Doesn't make all status codes 500 ([like the built-in Koa error handler does][gh-500-issue]) Supports Flash messages and preservation of newly set session object Fixes annoying redirect issue where flash messages were lost upon an error being thrown Supports HTML Error Lists using for Mongoose validation errors with more than one message Makes ctx.throw beautiful messages (e.g. ctx.throw(404) will output a beautiful error object :hibiscus:) Supports text/html , application/json , and text response types Supports and recommends use of [mongoose-beautiful-unique-validation][mongoose-beautiful-unique-validation] ","default_branch":null,"files":null,"tree":[],"storefront":"/r/ladjs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ladjs/koa-better-error-handler/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}