Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixing zp panics when file doesn't exist Issue #1 #8

Conversation

noble-varghese
Copy link
Contributor

Resolves Issue #1 i.e when the file doesn't exist then it returns a valid error to the user.

Copy link
Owner

@bahdotsh bahdotsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heyy, we don't really have to create a new method, just have to handle the error from read_to_string()!

1. Removed the method with Query to check the file existence
2. Added a new function to read the contents of the file
@noble-varghese noble-varghese requested a review from bahdotsh April 13, 2023 10:48
@noble-varghese
Copy link
Contributor Author

Heyy, we don't really have to create a new method, just have to handle the error from read_to_string()!

I have removed the method implementation in Query and defined a function that takes care of reading the file and returning appropriate responses while reading the file. Please take a look.

Copy link
Owner

@bahdotsh bahdotsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bahdotsh bahdotsh merged commit 5155815 into bahdotsh:main Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants