# EnvaptErrorCodes

```ts
const EnvaptErrorCodes: object;
```

Numeric codes carried by [EnvaptError.code](../classes/EnvaptError.mdx#property-code). The hundreds digit groups them by failure:
1xx for fallbacks, 2xx for conversion and validation, 3xx for configuration and lookup.

## Type Declaration

| Name | Type | Description |
| ------ | ------ | ------ |
|  `ArrayElementConversionFailed` | `206` | Thrown when an array element fails to convert to the array's element type. |
|  `ArrayFallbackElementTypeMismatch` | `103` | Thrown when an array fallback mixes element types, or its elements do not match the array's element converter. |
|  `EmptyArrayElement` | `207` | Thrown in strict mode when an array element is empty or whitespace only. |
|  `EnvFilesNotFound` | `303` | Thrown when a listed env file does not exist. |
|  `FallbackConverterTypeMismatch` | `104` | Thrown when a fallback does not match the type its built-in converter returns. |
|  `FileApiUnsupported` | `306` | Thrown when a file API such as `envPaths` or `baseDir` runs on a source without files, or on the portable build with `fileApiMode = 'throw'`. |
|  `InvalidArrayConverterType` | `201` | Thrown when an array converter is not a `Converters.array()` token, or its `of` is neither a built-in scalar nor a function. |
|  `InvalidBuiltInConverter` | `202` | Thrown when a converter string is not one of the built-in tokens. |
|  `InvalidCustomConverter` | `203` | Thrown when a converter is neither a built-in token nor a function. |
|  `InvalidEnvValue` | `210` | Thrown when a required read gets a value it can't convert, a bad array element, or an error from a custom parser or schema. `getRequiredAll` throws it once for all bad values, schema fields included. |
|  `InvalidFallback` | `101` | Thrown when an array converter gets a fallback that is not an array. |
|  `InvalidKeyInput` | `304` | Thrown when the key list is empty, or a key is not a string or is blank. |
|  `InvalidMergedSource` | `308` | Thrown when `merge` is called with no members, or with more than one filesystem-backed source. |
|  `InvalidUserDefinedConfig` | `302` | Thrown when an option or setting has an invalid value, or combines options that cannot go together. |
|  `MalformedTimeFallback` | `105` | Thrown when a time-string fallback does not match the `<number><unit>` format. |
|  `MissingDelimiter` | `301` | Thrown when an array converter's delimiter is missing or an empty string. |
|  `MissingEnvValue` | `305` | Thrown when a required value is missing or empty, or in strict mode when a `${VAR}` can't resolve. |
|  `NoSourceBound` | `307` | Thrown when an environment value is read before a source is bound with `Envapter.useSource`. |
|  `SchemaThrew` | `209` | Thrown when a Standard Schema's `validate` throws in `getAs` or `@Envapt({ schema })` without `required`. A required read reports it as an `InvalidEnvValue` issue. |
|  `SchemaValidationFailed` | `208` | Thrown when `getAs` or `@Envapt({ schema })` without `required` reads a value its Standard Schema rejects. |

## See

[https://envapt.materwelon.dev/docs/errors#codes](https://envapt.materwelon.dev/docs/errors#codes)