Repository navigation
Align error handling behavior - #548
Conversation
| .into(), | ||
| ), | ||
| }, | ||
| _ => Ok(ObjectLen::NoneExisting), |
There was a problem hiding this comment.
Doesn't it make more sense that this is an error?
There was a problem hiding this comment.
Yes, in new behavior it is an error (see json_obj_len). This is to maintain legacy behavior.
There was a problem hiding this comment.
So why add it as part of the valid return value and not as error?
There was a problem hiding this comment.
Just for backward compatibility with V 1.0 (only with legacy path)
JSON.OBJKEYS doc1 .nowhere and JSON.OBJKEYS no_such_doc . should return null (as before)
|
|
||
| # test elements with undefined lengths | ||
| r.assertEqual(r.execute_command('JSON.ARRLEN', 'test', '.bool'), None) | ||
| r.expect('JSON.ARRLEN', 'test', '.bool').raiseError() |
There was a problem hiding this comment.
Let add .contains with a substring we expect to see in the error
MeirShpilraien
left a comment
There was a problem hiding this comment.
Looks good, some comments.
Also why did you updated readies submodule?
Build was failing |
MeirShpilraien
left a comment
There was a problem hiding this comment.
Added one followup question on one of the comment, but no a blocker.
| .into(), | ||
| ), | ||
| }, | ||
| _ => Ok(ObjectLen::NoneExisting), |
There was a problem hiding this comment.
Just for backward compatibility with V 1.0 (only with legacy path)
JSON.OBJKEYS doc1 .nowhere and JSON.OBJKEYS no_such_doc . should return null (as before)
Maintain legacy behavior
And some tuning of new behavior