[NX-153] Implement custom error handling