Implement error controller