mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-11 18:39:08 +00:00
Better error handling on input creation
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Inject, OnModuleInit } from '@nestjs/common';
|
||||
import { HttpException, Inject, OnModuleInit } from '@nestjs/common';
|
||||
import { ClientGrpc, Payload } from '@nestjs/microservices';
|
||||
import {
|
||||
PipelineServicesNames,
|
||||
@@ -49,7 +49,10 @@ export class PipelinesClientService implements OnModuleInit {
|
||||
})
|
||||
.then((res) => res)
|
||||
.catch((err) => {
|
||||
throw new Error(err);
|
||||
if (err.details == 'Invalid Request') {
|
||||
throw new HttpException(err.details, 400);
|
||||
}
|
||||
throw new HttpException(err.details, 500);
|
||||
});
|
||||
|
||||
return createPipelineResponse;
|
||||
|
||||
Reference in New Issue
Block a user