Don't try to .getErrorCode unless it's an AWS exception.