modified oracle sp response

This commit is contained in:
Kallesh B S 2025-05-09 10:38:16 +05:30
parent ad179c5f43
commit 9470845f37

View File

@ -16,6 +16,7 @@ export class SpService {
constructor(private readonly oracleDBService: OracleDBService) { }
async insertNewServiceProvider(body: InsertNewServiceProviderDTO) {
let connection;
try {
connection = await this.oracleDBService.getConnection();
@ -124,11 +125,10 @@ export class SpService {
const fres = await result.outBinds.p_cursor.getRows();
if (fres[0].ERRORMESG) {
console.log(fres[0].ERRORMESG);
throw new BadRequestException(fres[0].ERRORMESG)
}
return fres;
return fres[0];
} catch (error) {
if (error instanceof BadRequestException) {
this.logger.warn(error.message);
@ -296,11 +296,10 @@ export class SpService {
const fres = await result.outBinds.p_cursor.getRows();
if (fres[0].ERRORMESG) {
console.log(fres[0].ERRORMESG);
throw new BadRequestException(fres[0].ERRORMESG)
}
return fres;
return fres[0];
} catch (error) {
if (error instanceof BadRequestException) {
this.logger.warn(error.message);