@aws-amplify/analytics
Version:
Analytics category of aws-amplify
44 lines (40 loc) • 1.43 kB
text/typescript
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import { AmplifyErrorMap } from '@aws-amplify/core/internals/utils';
export enum AnalyticsValidationErrorCode {
NoAppId = 'NoAppId',
NoCredentials = 'NoCredentials',
NoEventName = 'NoEventName',
NoRegion = 'NoRegion',
InvalidTracker = 'InvalidTracker',
UnsupportedPlatform = 'UnsupportedPlatform',
NoTrackingId = 'NoTrackingId',
InvalidFlushSize = 'InvalidFlushSize',
}
export const validationErrorMap: AmplifyErrorMap<AnalyticsValidationErrorCode> =
{
[ ]: {
message: 'Missing application id.',
},
[ ]: {
message: 'Credentials should not be empty.',
},
[ ]: {
message: 'Events must specify a name.',
},
[ ]: {
message: 'Missing region.',
},
[ ]: {
message: 'Invalid tracker type specified.',
},
[ ]: {
message: 'Only session tracking is supported on React Native.',
},
[ ]: {
message: 'Invalid FlushSize, it should be smaller than BufferSize',
},
[ ]: {
message: 'A trackingId is required to use Amazon Personalize',
},
};