Further updates to error code handling