8000 New Error Type: ErrorRecordNotFound by akshat-kumar-singhal · Pull Request #1831 · gofr-dev/gofr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

New Error Type: ErrorRecordNotFound #1831

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

Merged
merged 22 commits into from
Jun 12, 2025

Conversation

akshat-kumar-singhal
Copy link
Contributor
@akshat-kumar-singhal akshat-kumar-singhal commented Jun 10, 2025

Description:
Created new error type ErrorRecordNotFound for No Records Found in DB scenario. This should be used by the store layer in case there are no rows returned for a given ID (where a single row was expected).

Breaking Changes (if applicable):
N/A

Additional Information:
Errors in the datastore package should not be aware of the http response codes, thereby should not implement the StatusCode method. While the status code method has been implemented for now to provide consistency, it should be removed eventually. Removing the StatusCode method would be a breaking change.

Checklist:

  • I have formatted my code using goimport and golangci-lint.
  • All new code is covered by unit tests.
  • This PR does not decrease the overall code coverage.
  • I have reviewed the code comments and documentation for clarity.

@Umang01-hash Umang01-hash merged commit c0b45c4 into gofr-dev:development Jun 12, 2025
16 checks passed
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.

3 participants
0