@aws-amplify/core
Version:
Core category of aws-amplify
20 lines (19 loc) • 873 B
TypeScript
import { AmplifyError } from './AmplifyError';
/**
* Stable error name/code thrown when a context is required but none is
* available (i.e. `Amplify.configure()` has not been called and no context was
* passed explicitly). Exposed as a constant so category packages can reliably
* catch this failure by name without importing the class.
*/
export declare const NO_AMPLIFY_CONTEXT_ERROR_NAME = "NoAmplifyContextError";
/**
* Thrown when a category API resolves the global {@link AmplifyContext} but none
* has been set (the "unconfigured" path).
*
* Uses core's {@link AmplifyError} machinery so consumers can catch it via
* `instanceof AmplifyError` / `instanceof NoAmplifyContextError`, or by the
* stable `name` ({@link NO_AMPLIFY_CONTEXT_ERROR_NAME}).
*/
export declare class NoAmplifyContextError extends AmplifyError {
constructor(message?: string);
}