Use handler to wrap errors in http