Production and Development error handler middleware