amplitude / amplitude/Amplitude-TypeScript

React-native Drop plugin throws error

Đang mở
#493 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
TypeScript
Star
180
Fork
68
Merge trung bình
3 ngày 1 giờ
Pull request đã merge (30 ngày)
29

Mô tả

## 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.