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(error): directly emit error from events #6472

Merged
merged 2 commits into from
Dec 12, 2024
Merged

fix(error): directly emit error from events #6472

merged 2 commits into from
Dec 12, 2024

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Dec 11, 2024

In @algolia/events, errors are properly rethrown if they are thrown with .emit('error', new Error("msg")), not if they are thrown with .emit('error', { error: new Error('msg') }). Therefore in InstantSearch and the helper, all errors are now properly thrown directly in the emit.

FX-3187

BREAKING CHANGE: if you have any on('error' handler that reads event.error from the callback, change that to just error

In `@algolia/events`, errors are properly rethrown if they are thrown with `.emit('error', new Error("msg"))`, not if they are thrown with `.emit('error', { error: new Error('msg') })`. Therefore in InstantSearch and the helper, all errors are now properly thrown directly in the emit.

[FX-3187]

BREAKING CHANGE: if you have any `on('error'` handler that reads `event.error` from the callback, change that to just `error`
@Haroenv Haroenv requested review from a team, dhayab and aymeric-giraudet and removed request for a team December 11, 2024 16:53
Copy link

codesandbox-ci bot commented Dec 11, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 7db5481:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration

@Haroenv Haroenv added this to the instantsearch.js v5 milestone Dec 11, 2024
@Haroenv Haroenv merged commit 156c338 into next Dec 12, 2024
10 checks passed
@Haroenv Haroenv deleted the fix/error-no-nest branch December 12, 2024 15:40
Haroenv added a commit that referenced this pull request Dec 17, 2024
In `@algolia/events`, errors are properly rethrown if they are thrown with `.emit('error', new Error("msg"))`, not if they are thrown with `.emit('error', { error: new Error('msg') })`. Therefore in InstantSearch and the helper, all errors are now properly thrown directly in the emit.

[FX-3187]

BREAKING CHANGE: if you have any `on('error'` handler that reads `event.error` from the callback, change that to just `error`
Haroenv added a commit that referenced this pull request Dec 26, 2024
In `@algolia/events`, errors are properly rethrown if they are thrown with `.emit('error', new Error("msg"))`, not if they are thrown with `.emit('error', { error: new Error('msg') })`. Therefore in InstantSearch and the helper, all errors are now properly thrown directly in the emit.

[FX-3187]

BREAKING CHANGE: if you have any `on('error'` handler that reads `event.error` from the callback, change that to just `error`
Haroenv added a commit that referenced this pull request Jan 9, 2025
In `@algolia/events`, errors are properly rethrown if they are thrown with `.emit('error', new Error("msg"))`, not if they are thrown with `.emit('error', { error: new Error('msg') })`. Therefore in InstantSearch and the helper, all errors are now properly thrown directly in the emit.

[FX-3187]

BREAKING CHANGE: if you have any `on('error'` handler that reads `event.error` from the callback, change that to just `error`
Haroenv added a commit that referenced this pull request Jan 17, 2025
In `@algolia/events`, errors are properly rethrown if they are thrown with `.emit('error', new Error("msg"))`, not if they are thrown with `.emit('error', { error: new Error('msg') })`. Therefore in InstantSearch and the helper, all errors are now properly thrown directly in the emit.

[FX-3187]

BREAKING CHANGE: if you have any `on('error'` handler that reads `event.error` from the callback, change that to just `error`
Haroenv added a commit that referenced this pull request Jan 17, 2025
In `@algolia/events`, errors are properly rethrown if they are thrown with `.emit('error', new Error("msg"))`, not if they are thrown with `.emit('error', { error: new Error('msg') })`. Therefore in InstantSearch and the helper, all errors are now properly thrown directly in the emit.

[FX-3187]

BREAKING CHANGE: if you have any `on('error'` handler that reads `event.error` from the callback, change that to just `error`
Haroenv added a commit that referenced this pull request Jan 17, 2025
In `@algolia/events`, errors are properly rethrown if they are thrown with `.emit('error', new Error("msg"))`, not if they are thrown with `.emit('error', { error: new Error('msg') })`. Therefore in InstantSearch and the helper, all errors are now properly thrown directly in the emit.

[FX-3187]

BREAKING CHANGE: if you have any `on('error'` handler that reads `event.error` from the callback, change that to just `error`
Haroenv added a commit that referenced this pull request Jan 17, 2025
In `@algolia/events`, errors are properly rethrown if they are thrown with `.emit('error', new Error("msg"))`, not if they are thrown with `.emit('error', { error: new Error('msg') })`. Therefore in InstantSearch and the helper, all errors are now properly thrown directly in the emit.

[FX-3187]

BREAKING CHANGE: if you have any `on('error'` handler that reads `event.error` from the callback, change that to just `error`
Haroenv added a commit that referenced this pull request Jan 21, 2025
In `@algolia/events`, errors are properly rethrown if they are thrown with `.emit('error', new Error("msg"))`, not if they are thrown with `.emit('error', { error: new Error('msg') })`. Therefore in InstantSearch and the helper, all errors are now properly thrown directly in the emit.

[FX-3187]

BREAKING CHANGE: if you have any `on('error'` handler that reads `event.error` from the callback, change that to just `error`
Haroenv added a commit that referenced this pull request Jan 21, 2025
In `@algolia/events`, errors are properly rethrown if they are thrown with `.emit('error', new Error("msg"))`, not if they are thrown with `.emit('error', { error: new Error('msg') })`. Therefore in InstantSearch and the helper, all errors are now properly thrown directly in the emit.

[FX-3187]

BREAKING CHANGE: if you have any `on('error'` handler that reads `event.error` from the callback, change that to just `error`
Haroenv added a commit that referenced this pull request Jan 22, 2025
In `@algolia/events`, errors are properly rethrown if they are thrown with `.emit('error', new Error("msg"))`, not if they are thrown with `.emit('error', { error: new Error('msg') })`. Therefore in InstantSearch and the helper, all errors are now properly thrown directly in the emit.

[FX-3187]

BREAKING CHANGE: if you have any `on('error'` handler that reads `event.error` from the callback, change that to just `error`
Haroenv added a commit that referenced this pull request Jan 22, 2025
In `@algolia/events`, errors are properly rethrown if they are thrown with `.emit('error', new Error("msg"))`, not if they are thrown with `.emit('error', { error: new Error('msg') })`. Therefore in InstantSearch and the helper, all errors are now properly thrown directly in the emit.

[FX-3187]

BREAKING CHANGE: if you have any `on('error'` handler that reads `event.error` from the callback, change that to just `error`
Haroenv added a commit that referenced this pull request Jan 27, 2025
In `@algolia/events`, errors are properly rethrown if they are thrown with `.emit('error', new Error("msg"))`, not if they are thrown with `.emit('error', { error: new Error('msg') })`. Therefore in InstantSearch and the helper, all errors are now properly thrown directly in the emit.

[FX-3187]

BREAKING CHANGE: if you have any `on('error'` handler that reads `event.error` from the callback, change that to just `error`
Haroenv added a commit that referenced this pull request Jan 28, 2025
In `@algolia/events`, errors are properly rethrown if they are thrown with `.emit('error', new Error("msg"))`, not if they are thrown with `.emit('error', { error: new Error('msg') })`. Therefore in InstantSearch and the helper, all errors are now properly thrown directly in the emit.

[FX-3187]

BREAKING CHANGE: if you have any `on('error'` handler that reads `event.error` from the callback, change that to just `error`
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.

2 participants