cosad3s / postleaks

Search for sensitive data in Postman public library.
GNU General Public License v3.0
165 stars 24 forks source link

Improve Error Handling in fail Function to Prevent Premature Exiting #3

Closed fc-arvind closed 3 months ago

fc-arvind commented 3 months ago

Problem

Currently, the fail function in our codebase has a tendency to exit the code abruptly, hindering our ability to retrieve essential data that might still be available despite the encountered error. This behavior leads to incomplete data analysis and potentially overlooked insights.

Proposed Solution

To address this issue, we need to refactor the fail function to handle errors gracefully without exiting the code immediately. Instead, it should log the error, allowing the execution to continue and giving us the opportunity to salvage any available data. We need not always continue the code. But sometimes we should.

image

This is after my changes image

cosad3s commented 3 months ago

Thanks @fc-arvind , I have merged your PR.

I am not 100% sure the error screenshot was linked to the fix, I have identified a rate-limiting from Postman on workspaces searches but anyway it is good idea to not exit during a loop.

I have identified another problem with Whispers. I opened an issue at https://github.com/adeptex/whispers/issues/127.

fc-arvind commented 3 months ago

Hi @cosad3s , I am sorry. I have been sick for the past few days. I will take a look into this.