ALM-426 better handling of different error conditions