Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure that user supplied notion endpoints get a response #593

Merged
merged 5 commits into from
Apr 14, 2022

Conversation

aalemayhu
Copy link
Contributor

There were some cases where errors were not propagated correctly.

```
Traceback (most recent call last):
  File "/Users/scanf/src/github.com/alemayhu/notion2anki/server/genanki/create_dec
k.py", line 138, in <module>
    my_note = Note(model, fields=fields, sort_field=card["number"], tags=card['tag
s'], guid=g)
  File "/Library/Python/3.8/site-packages/genanki/note.py", line 56, in __init__
    self.tags = tags or []
  File "/Library/Python/3.8/site-packages/genanki/note.py", line 78, in tags
    self._tags.extend(val)
  File "/Library/Python/3.8/site-packages/genanki/note.py", line 41, in extend
    self._validate_tag(tag)
  File "/Library/Python/3.8/site-packages/genanki/note.py", line 13, in _validate_
tag
    raise ValueError('Tag "{}" contains a space; this is not allowed!'.format(tag)
)
ValueError: Tag "the tag" contains a space; this is not allowed!
```
@aalemayhu aalemayhu enabled auto-merge April 14, 2022 12:38
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@aalemayhu aalemayhu merged commit f5f22b7 into main Apr 14, 2022
@aalemayhu aalemayhu deleted the feat/show-error branch April 14, 2022 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant