Skip to content

The error message when the user is not logged to leetcode is misleading #50

@yurirocha15

Description

@yurirocha15

Error:

('submission_id',)
Traceback (most recent call last):
  File "/home/yuri/.pyenv/versions/3.8.5/envs/leet2git/lib/python3.8/site-packages/leet2git/leet2git.py", line 129, in submit
    lc.submit_question(code, question_data.internal_id, title_slug, cm.config["language"])
  File "/home/yuri/.pyenv/versions/3.8.5/envs/leet2git/lib/python3.8/site-packages/leet2git/leetcode_client.py", line 282, in submit_question
    submission_id: int = json.loads(response.text)[submission_field]
KeyError: 'submission_id'

Actual leetcode response:

{"error": "User is not authenticated"}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions