adding generic error mapping