The extension read process.env directly with fallbacks and degraded gracefully when a variable was missing. The kit's params layer crashes at cold start instead. Only reachable outside a normal CLI deploy (library consumers of the params entry point, emulator runs, hand-rolled .env), since the CLI prompts for every param absent from .env.
Two remaining crash paths:
IMAGE_TYPE: ListParam.value() JSON-parses the raw variable, so an unset value throws SyntaxError at cold start, and an extension-style jpeg,webp value is not valid JSON either.
FUNCTION_MEMORY: IntParam yields 0 when unset or non-numeric, and normalizeMemory passes that through as an invalid "0" memory option.
Fix in #3002 (approved): configFromEnv returns undefined for an absent IMAGE_TYPE and passes non-JSON input through as a raw string for the resolver's comma-splitting toArray, and the 0 memory sentinel maps to undefined so the 1GiB default applies.
Parity ledger: #2974, storage-resize-images runtime-contract table.
The extension read
process.envdirectly with fallbacks and degraded gracefully when a variable was missing. The kit's params layer crashes at cold start instead. Only reachable outside a normal CLI deploy (library consumers of the params entry point, emulator runs, hand-rolled.env), since the CLI prompts for every param absent from.env.Two remaining crash paths:
IMAGE_TYPE:ListParam.value()JSON-parses the raw variable, so an unset value throwsSyntaxErrorat cold start, and an extension-stylejpeg,webpvalue is not valid JSON either.FUNCTION_MEMORY:IntParamyields0when unset or non-numeric, andnormalizeMemorypasses that through as an invalid"0"memory option.Fix in #3002 (approved):
configFromEnvreturnsundefinedfor an absentIMAGE_TYPEand passes non-JSON input through as a raw string for the resolver's comma-splittingtoArray, and the0memory sentinel maps toundefinedso the1GiBdefault applies.Parity ledger: #2974, storage-resize-images runtime-contract table.