Error handling in adapters