UNPKG

@adapty/capacitor

Version:
21 lines 722 B
import { SimpleCoder } from './coder'; import { AdaptyError } from '../adapty-error'; export class AdaptyNativeErrorCoder extends SimpleCoder { constructor() { super(...arguments); this.type = 'error'; this.properties = { adaptyCode: { key: 'adapty_code', required: true, type: 'number' }, message: { key: 'message', required: true, type: 'string' }, detail: { key: 'detail', required: false, type: 'string' }, }; } getError(data) { return new AdaptyError({ adaptyCode: data.adaptyCode, message: data.message, detail: data.detail, }); } } //# sourceMappingURL=adapty-native-error.js.map