found a case with an empty error code - adding protection to find the
bug