Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
haskell-gargantext
haskell-gargantext
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 164
    • Issues 164
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 8
    • Merge Requests 8
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • gargantext
  • haskell-gargantexthaskell-gargantext
  • Issues
  • #481

Closed
Open
Opened Jun 16, 2025 by Alfredo Di Napoli@AlfredoDiNapoli
  • Report abuse
  • New issue
Report abuse New issue

`extractNgramsFromDocument` shouldn't catch all exceptions (let alone async ones!)

@cgenie spotted a bug I have introduced as part of !415 (merged) . In particular, the extractNgramsFromDocument function is catching all exceptions, and it's doing so using Control.Monad.Catch and not Control.Exception.Safe, which means that it will intercept things like the KillWorkerSafely exceptions being thrown when we hard-quit the server with ctrl^c.

I think that extractNgrams should be given the ability of throw a specialised exception (like NgramsExtractionException or similar) that can be used to wrap any HttpException in the implementation of the main instance, so that we can catch the correct exception, leaving the other be.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
1
Labels
Doing
Assign labels
  • View project labels
Reference: gargantext/haskell-gargantext#481