@aws-amplify/core
Version:
Core category of aws-amplify
25 lines (20 loc) • 805 B
text/typescript
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import { AmplifyErrorCode, AmplifyErrorMap, AssertionFunction } from '../types';
import { createAssertionFunction } from './createAssertionFunction';
const amplifyErrorMap: AmplifyErrorMap<AmplifyErrorCode> = {
[ ]: {
message: 'Endpoint ID was not found and was unable to be created.',
},
[ ]: {
message: 'Function not supported on current platform.',
},
[ ]: {
message: 'An unknown error occurred.',
},
[ ]: {
message: 'A network error has occurred.',
},
};
export const assert: AssertionFunction<AmplifyErrorCode> =
createAssertionFunction(amplifyErrorMap);