Error handling and express extensions