Azure / Azure/cosmos-explorer

SELECT VALUE raises unexpected error

Open
#176 4 comments 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
131
Forks
67
Avg merge
3d 13h
Merged PRs (30d)
10

Description

**Describe the bug**
The following queries work as expected:
```
SELECT VALUE (true)
SELECT VALUE (1)
SELECT VALUE ("foo")
```

But the following queries return an error "Cannot set property 'headers' of undefined":
```
SELECT VALUE (false)
SELECT VALUE (0)
SELECT VALUE ("")
SELECT VALUE (null)
```

**To Reproduce**
Run the queries in the Data Explorer.

**Expected behavior**
The correct values being returned without error.

**Actual behavior**
The above error is raised.

Contributor guide

Open the contributing guide

Research direction

Start in the Data Explorer by running the listed SELECT VALUE queries and compare the handling of truthy and falsy results. Trace the result path that raises "Cannot set property 'headers' of undefined"; done means false, 0, empty-string, and null values return correctly without the error.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.