You could check not an array or if no length.
The first part
!Array.isArray(this.rxInfos)
is true, if the value of this.rxInfos is not an array.
The logical OR || allows to end the check, which is important, if the first operand it truthy. If not, then an array is given and the second part
!this.rxInfos.length
with the length and their logical NOT ! is evaluated and that means, if a length of zero, the last part is true or if the length has another value than zero, the part yields false.
if (!Array.isArray(this.rxInfos) || !this.rxInfos.length) {
return this.errorHandler(request, 'no rx found in the cache');
}
&&, you are checking that both are true at the same time.||instead of&&.if (not an Array AND the length is zero)