Open shau-kote opened 10 months ago
Description
The given PR provides a way to replace the failure implementation used by the built-in codecs, like, t.string etc.
failure
t.string
Goal
We want to use the current full-featured validation in the dev environment, but in the production we want to just log errors and go ahead "as is".
So the idea is to have an option to change the validation behaviour with a code like this.
import {success, setFailureImplementation} from '' if (process.env.NODE_ENV !== 'development') { setFailureImplementation(value, context, message) => { Logger.logError(context, message) return success(value) } }
Please feel free to add your feedback, I'll do my best to fine-tune my PR>
Description
The given PR provides a way to replace the
failure
implementation used by the built-in codecs, like,t.string
etc.Goal
We want to use the current full-featured validation in the dev environment, but in the production we want to just log errors and go ahead "as is".
So the idea is to have an option to change the validation behaviour with a code like this.
Please feel free to add your feedback, I'll do my best to fine-tune my PR>