amplitude / amplitude/Amplitude-TypeScript

React-native Drop plugin throws error

Aperta
#493 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
TypeScript
Stelle
180
Fork
68
Merge medio
3g 1h
PR unite (30g)
29

Descrizione

## Expected Behavior
Drop event plugin like in the [example](https://www.docs.developers.amplitude.com/data/sdk-plugins/#enrichment-type-plugin_1) (return null in execute) should ignore the event.

## Current Behavior
The event is dropped, but there's an error (Logger Error) without any details.

## Steps to Reproduce
```
const mockPlugin: EnrichmentPlugin = {
name: 'mock-plugin',
type: 'enrichment',
setup: async () => Promise.resolve(),
execute: async (event: Event) => {
console.debug('[metrics-react-native] droping', event)
return Promise.resolve(null)
},
}
```

## Environment
- "@amplitude/analytics-react-native": "^1.3.1",
- "@amplitude/ampli": "^1.31.5",

- Installation Method: yarn
- Browser and Version: react-native Android

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.