Skip to content

DotEnvError

[Source]

The reasons a .env file cannot be used. Both mean secrets the file was meant to supply are absent, so neither is safe to carry on from. Both describe themselves, so a caller can report one without matching on it.

A path with no file at it is not one of them. ReadEnvSecrets reports that as success and returns the process environment alone: a .env file is a development convenience, and a deployed application is normally handed its secrets by the environment.

type DotEnvError is
  (DotEnvUnreadable val | DotEnvMalformed val)

Type Alias For