Skip to content

Commit

Permalink
fix: improve configuration validation (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbsfilho authored Sep 26, 2024
1 parent 191dd9c commit d7ee13e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,13 @@ import { AzionConfig } from './types';
* });
*/
function defineConfig(config: AzionConfig): AzionConfig {
validateConfig(config);
try {
validateConfig(config);
} catch (error) {
const errorNoStack = new Error((error as Error).message);
errorNoStack.stack = undefined;
throw errorNoStack;
}
return config;
}

Expand Down

0 comments on commit d7ee13e

Please sign in to comment.