Insufficient error reporting on alpha1
See original GitHub issueError is:
File "/usr/local/lib/python3.7/dist-packages/edgedb/asyncio_con.py", line 71, in fetchone
query, args, kwargs)
File "edgedb/protocol/protocol.pyx", line 476, in execute_anonymous
File "edgedb/protocol/protocol.pyx", line 189, in _parse
edgedb.errors.InternalServerError: 'cookie_id'
The query is:
WITH
NewUser := (INSERT User {
first_name := <str>$first_name,
last_name := <str>$last_name,
email := <str>$email,
password := <str>$password,
}),
NewSession := (INSERT Session {
cookie := <str>$cookie_id,
expires := <datetime>$expires,
user := NewUser,
})
SELECT NewUser {
id
}
Schema is:
type User {
property first_name -> str;
property last_name -> str;
required property email -> str {
constraint exclusive;
};
property password -> str;
}
type Session {
required property cookie -> str;
required property expires -> datetime;
multi link user -> User;
index cookie_idx on (__subject__.cookie);
}
Small change like this:
WITH
NewUser := (INSERT User {
first_name := <str>$first_name,
last_name := <str>$last_name,
email := <str>$email,
password := <str>$password,
}),
NewSession := (INSERT Session {
cookie := <str>$cookie_id,
expires := <datetime>$expires,
user := NewUser,
})
SELECT NewSession {
cookie
}
makes query working. I’m not sure if the query actually makes sense. I originally wanted to do two inserts and return data from the first one. I guess there is some pruning of unused variables going on…
Edgedb version is alpha1 from the distribution. Not sure if it’s fixed in master.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Type I and type II errors - Wikipedia
In statistical hypothesis testing, a type I error is the mistaken rejection of an actually true null hypothesis (also known as a "false...
Read more >Lipemia: causes, interference mechanisms, detection and ...
Another issue regarding automatic detection of lipemia is a lack of standardization among manufactures in reporting L-index values. Some use semi quantitative, ...
Read more >Fix common cluster issues | Elasticsearch Guide [8.5] | Elastic
This error indicates a data node is critically low on disk space and has reached the flood-stage disk usage watermark. Circuit breaker errors:...
Read more >Type I and II Errors and Significance Levels
Type I and II Errors and Significance Levels. Type I Error Rejecting the null hypothesis when it is in fact true is called...
Read more >Apache Log4j Security Vulnerabilities
Apache Log4j Security Vulnerabilities. This page lists all the security vulnerabilities fixed in released versions of Apache Log4j 2.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Some context on closing this: correct protocol implementation would guard against sending incorrect number of arguments or types. The server should react in a relatively nice way if it wasn’t the case, but right now we lack proper testing infrastructure to add tests for that. We’ll deal with this and many other scenarios when we start investing into proper low-level protocol testing infra.
The
WITH
clause, unlike in SQL is purely declarative, so if you don’t refer to the declared query, it never gets executed. TheKeyError
on the parameter name is a bug for sure.