README.md in caddy-1.5.0 vs README.md in caddy-1.5.1

- old
+ new

@@ -36,10 +36,12 @@ end ``` ## Error handling -As Caddy refreshers are run in threads, exceptions are not normally reported (except by default in the logs). To add a programmatic error handler: +As Caddy refreshers are run in threads, exceptions are not normally reported (except by default in the logs). If your refresher errors out (or times out, which can happen if your refresher takes as long as your refresh interval to run) your error handler will be called and the cache value will remain what it was before it errored. This means your application may use stale values until your refresher stops erroring. + +To add a programmatic error handler: ```ruby Caddy[:flags].refresher = -> { SomeFlagService.fetch_flags } Caddy.error_handler = -> (exception) { ExceptionReporter.bad_thing_happened(exception) } # global (all caches) error handler Caddy[:flags].error_handler = -> (exception) { SpecificExceptionReporter.worse_thing_happened(exception) } # cache-specific error reporters also supported