File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/modules/config-profiles Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -256,6 +256,8 @@ export class ConfigProfileService {
256
256
257
257
return this . getConfigProfileByUUID ( existingConfigProfile . uuid ) ;
258
258
} catch ( error ) {
259
+ this . logger . error ( error ) ;
260
+
259
261
if (
260
262
error instanceof PrismaClientKnownRequestError &&
261
263
error . code === 'P2002' &&
@@ -271,7 +273,14 @@ export class ConfigProfileService {
271
273
return { isOk : false , ...ERRORS . CONFIG_PROFILE_NAME_ALREADY_EXISTS } ;
272
274
}
273
275
}
274
- this . logger . error ( error ) ;
276
+
277
+ if ( error instanceof Error ) {
278
+ return {
279
+ isOk : false ,
280
+ ...ERRORS . CONFIG_VALIDATION_ERROR . withMessage ( error . message ) ,
281
+ } ;
282
+ }
283
+
275
284
return {
276
285
isOk : false ,
277
286
...ERRORS . UPDATE_CONFIG_PROFILE_ERROR ,
You can’t perform that action at this time.
0 commit comments