Skip to content

Commit 7a4e170

Browse files
authored
Merge pull request #483 from bcgov/dev-AH-FOIMOD-errorhandlingfix
Error Handling Adjustment
2 parents ed47149 + 0748816 commit 7a4e170

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

api/apiCustomFunctions.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ const submitFoiRequest = async (server, req, res, next) => {
7878
}
7979
catch(error){
8080
console.log(`${error}`);
81+
console.log("FOI API STATUS:", error.response.status);
82+
console.log("FOI API DATA:", error.response.data)
8183
req.log.info('Failed:', error);
8284
const unavailable = new restifyErrors.ServiceUnavailableError(error.message || 'Service is unavailable.');
8385
return next(unavailable);

0 commit comments

Comments
 (0)