Add dev and production errorHandling