File tree 1 file changed +17
-3
lines changed
apps/web/src/environments
1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,14 @@ const Config = z.object({
21
21
type Config = z . infer < typeof Config > ;
22
22
23
23
export const getConfig = ( ) : Config => {
24
- return Config . parse ( Configuration ) ;
24
+ try {
25
+ return Config . parse ( Configuration ) ;
26
+ } catch ( err ) {
27
+ if ( err instanceof z . ZodError ) {
28
+ console . log ( err . issues ) ;
29
+ }
30
+ throw err ;
31
+ }
25
32
} ;
26
33
27
34
const OnPatientConfig = z . object ( {
@@ -33,6 +40,13 @@ export const getOnPatientConfig = () => {
33
40
} ;
34
41
35
42
export const getRedirectUri = ( ) => {
36
- const config = Config . parse ( Configuration ) ;
37
- return config . REDIRECT_URI || config . PUBLIC_URL ;
43
+ try {
44
+ const config = Config . parse ( Configuration ) ;
45
+ return config . REDIRECT_URI || config . PUBLIC_URL ;
46
+ } catch ( err ) {
47
+ if ( err instanceof z . ZodError ) {
48
+ console . log ( err . issues ) ;
49
+ }
50
+ throw err ;
51
+ }
38
52
} ;
You can’t perform that action at this time.
0 commit comments