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

Revert breaking behavioural change #355

Merged
merged 3 commits into from
Jan 23, 2025
Merged

Revert breaking behavioural change #355

merged 3 commits into from
Jan 23, 2025

Conversation

jwulf
Copy link
Member

@jwulf jwulf commented Jan 23, 2025

Description of the change

Log out when a job cannot be found by job.complete() or job.fail(), but do not throw the exception. This preserves the existing behaviour, where no exception is thrown, but makes the user aware of the condition.

You can catch the condition in the following way, if you want to:

job.complete().catch(
   e => {
      if ((e as Error).message.includes('5 NOT_FOUND')) {
         // the job was completed, failed, or the process instance was cancelled
      }
   })

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • I have read the CONTRIBUTING doc
  • I have opened this pull request against the alpha branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

[If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...]

@jwulf jwulf merged commit 76dc92f into main Jan 23, 2025
11 of 14 checks passed
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