BS-11577 - return right error code