Skip to content

Commit

Permalink
Merge pull request #65 from Shubham4026/bakend_feature
Browse files Browse the repository at this point in the history
Bug PS-2686 : Bug Fixed for Status code of Multipart form data
  • Loading branch information
arati-tekdi authored Nov 27, 2024
2 parents c567917 + 29f5ee2 commit af281bd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/middleware/gateway.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export class GatewayService {
res.json(error.response.data);
} else if (error.request) {
// No response was received
res.status(500);
return {
result: {},
params: {
Expand All @@ -65,6 +66,7 @@ export class GatewayService {
responseCode: 500,
};
} else {
res.status(500);
// Error occurred in setting up the request
return error.message;
}
Expand All @@ -84,13 +86,16 @@ export class GatewayService {
},
});
res.locals.responseBody = response.data;
res.status(response.status);
return response.data;
} catch (error) {
if (error.response) {
res.locals.responseBody = error.data;
res.status(error.response.status);
return error.response.data;
} else if (error.request) {
// No response was received
res.status(500);
return {
result: {},
params: {
Expand Down

0 comments on commit af281bd

Please sign in to comment.