modified oracle sp response
This commit is contained in:
parent
ad179c5f43
commit
9470845f37
@ -16,6 +16,7 @@ export class SpService {
|
|||||||
constructor(private readonly oracleDBService: OracleDBService) { }
|
constructor(private readonly oracleDBService: OracleDBService) { }
|
||||||
|
|
||||||
async insertNewServiceProvider(body: InsertNewServiceProviderDTO) {
|
async insertNewServiceProvider(body: InsertNewServiceProviderDTO) {
|
||||||
|
|
||||||
let connection;
|
let connection;
|
||||||
try {
|
try {
|
||||||
connection = await this.oracleDBService.getConnection();
|
connection = await this.oracleDBService.getConnection();
|
||||||
@ -124,11 +125,10 @@ export class SpService {
|
|||||||
const fres = await result.outBinds.p_cursor.getRows();
|
const fres = await result.outBinds.p_cursor.getRows();
|
||||||
|
|
||||||
if (fres[0].ERRORMESG) {
|
if (fres[0].ERRORMESG) {
|
||||||
console.log(fres[0].ERRORMESG);
|
|
||||||
throw new BadRequestException(fres[0].ERRORMESG)
|
throw new BadRequestException(fres[0].ERRORMESG)
|
||||||
}
|
}
|
||||||
|
|
||||||
return fres;
|
return fres[0];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof BadRequestException) {
|
if (error instanceof BadRequestException) {
|
||||||
this.logger.warn(error.message);
|
this.logger.warn(error.message);
|
||||||
@ -296,11 +296,10 @@ export class SpService {
|
|||||||
const fres = await result.outBinds.p_cursor.getRows();
|
const fres = await result.outBinds.p_cursor.getRows();
|
||||||
|
|
||||||
if (fres[0].ERRORMESG) {
|
if (fres[0].ERRORMESG) {
|
||||||
console.log(fres[0].ERRORMESG);
|
|
||||||
throw new BadRequestException(fres[0].ERRORMESG)
|
throw new BadRequestException(fres[0].ERRORMESG)
|
||||||
}
|
}
|
||||||
|
|
||||||
return fres;
|
return fres[0];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof BadRequestException) {
|
if (error instanceof BadRequestException) {
|
||||||
this.logger.warn(error.message);
|
this.logger.warn(error.message);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user