Closed BenediktBurger closed 7 months ago
Attention: Patch coverage is 88.57143%
with 4 lines
in your changes are missing coverage. Please review.
Project coverage is 87.68%. Comparing base (
db1e795
) to head (5b3b193
).
Files | Patch % | Lines |
---|---|---|
pyleco/json_utils/errors.py | 71.42% | 4 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
What do you think about the reorganization, that all errors are in one file and all json rpc objects in another file, @bilderbuchi ?
What do you think about the reorganization, that all errors are in one file and all json rpc objects in another file, @bilderbuchi ?
Sounds good in general to keep error definitions together. From a quick glance, it seems strange that all (even generic) errors are in the json_utils
module, I would have thought to prefer the pyleco.errors
module as the more fitting place to collect all the errors (json-related and other)?
Thanks for your comment. Basically all errors are json errors, either defikned by jsonrpc or defined by leco for use in jsonrpc messages. The LECO error codes (for example for NOT_SIGNED_IN) are according to jsonrpc specifications and a re meant to be sent via jsonrpc messages, so they are json errors.
If you deem it better, I'll move the errors file to the root directory.
If you deem it better, I'll move the errors file to the root directory.
I don't have strong feelings either way.
Thanks for your comments. I looked at the code again, and the errors are all json related, therefore, I'll keep them in the json directory.
Now that we have our own json-objects and errors file, we can put all errors (even the LECO ones and the pyleco
INVALID_SERVER_RESPONSE
) into one file instead of keeping errors distributed over several files (errors, json_utils.errors, rpc_generator).