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

Refactor the error reporting chain #6524

Merged
merged 2 commits into from
Nov 5, 2021
Merged

Refactor the error reporting chain #6524

merged 2 commits into from
Nov 5, 2021

Conversation

drew2a
Copy link
Contributor

@drew2a drew2a commented Nov 3, 2021

This PR fixes #6509 by refactoring the error reporting chain.

This PR introduces ReportedError class for sending errors from core to gui instead of using dict.

@dataclass
class ReportedError:
    type: str
    text: str
    event: dict
    requires_user_consent: bool

    long_text: str = ''
    context: str = ''
    should_stop: Optional[bool] = None

It also adds missed requires_user_consent field that has been removed (probably) during #6206

@drew2a drew2a force-pushed the fix/6509 branch 5 times, most recently from bcfcf26 to 94e2187 Compare November 4, 2021 14:35
@drew2a drew2a requested a review from kozlovsky November 4, 2021 14:41
@drew2a drew2a marked this pull request as ready for review November 4, 2021 14:41
@drew2a drew2a requested a review from a team November 4, 2021 14:41
@drew2a drew2a requested a review from kozlovsky November 5, 2021 10:17
@drew2a drew2a force-pushed the fix/6509 branch 2 times, most recently from fe410d5 to ac7425c Compare November 5, 2021 11:26
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 5, 2021

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 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@drew2a drew2a merged commit 8b51589 into Tribler:main Nov 5, 2021
@drew2a drew2a deleted the fix/6509 branch November 5, 2021 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Replace text separators --LONG TEXT-- and --CONTEXT-- by separate fields in an event
2 participants