Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: always emit a message from emitError #565

Merged
merged 6 commits into from
Feb 27, 2025

Conversation

nicholasgriffintn
Copy link
Member

@nicholasgriffintn nicholasgriffintn commented Feb 27, 2025

Resolves #564

Description:

As described in the issue, #560 made a change that meant that all emitted events always included metadata as the last parameter, this meant that message was no longer the second parameter in error events which breaks some handling for users who where using that method to get the message details.

Type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Why is this change required?:

This ensures that the change is backwards compatible by making emitError emit undefined as the second parameter if messages were not provided to it.

NOTE: This does changed the type from setting void in the return union for the error emitted to event to be more explicitly undefined

Copy link

github-actions bot commented Feb 27, 2025

LCOV of commit 0883347 during Comment PR Coverage #114

Summary coverage rate:
  lines......: 97.3% (976 of 1003 lines)
  functions..: 97.3% (36 of 37 functions)
  branches...: no data found

Files changed coverage rate:
                   |Lines       |Functions  |Branches    
  Filename         |Rate     Num|Rate    Num|Rate     Num
  =======================================================
  src/consumer.ts  | 3.2%    656| 0.0%    21|    -      0

@nicholasgriffintn nicholasgriffintn marked this pull request as ready for review February 27, 2025 16:45
@nicholasgriffintn nicholasgriffintn requested review from a team as code owners February 27, 2025 16:45
@nicholasgriffintn nicholasgriffintn merged commit e259048 into canary Feb 27, 2025
13 checks passed
@nicholasgriffintn nicholasgriffintn deleted the update-emitter-for-backwards-compat branch February 27, 2025 16:48
@github-actions github-actions bot locked and limited conversation to collaborators Feb 27, 2025
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Latest addition of QueueMetadata to error event is a breaking change
1 participant