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

Return correct error codes for projections #384

Merged
merged 8 commits into from
Mar 22, 2022
Merged

Return correct error codes for projections #384

merged 8 commits into from
Mar 22, 2022

Conversation

seeforschauer
Copy link
Contributor

@seeforschauer seeforschauer commented Mar 22, 2022

For #377 and #382

@seeforschauer seeforschauer marked this pull request as ready for review March 22, 2022 13:02
@seeforschauer seeforschauer requested a review from AlekSi as a code owner March 22, 2022 13:02
@seeforschauer seeforschauer changed the title projection add error codes when inclusion and exclusion is used Projection add error codes when inclusion and exclusion is used Mar 22, 2022
@seeforschauer seeforschauer added the trust PRs that can access Actions secrets label Mar 22, 2022
ErrCommandNotFound = ErrorCode(59) // CommandNotFound
ErrNotImplemented = ErrorCode(238) // NotImplemented
ErrProjectionInclusionInExclusion = ErrorCode(31253) // Cannot do inclusion on field array in exclusion projection
ErrProjectionExclusionInInclusion = ErrorCode(31253) // Cannot do exclusion on field array in inclusion projection
Copy link
Member

Choose a reason for hiding this comment

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

There are several problems:

  • the error code for that one is 31254;
  • "array" there is a field name, not a part of the the error message;
  • that comment specifies a string value produced by stringer tool (that wasn't run), not a error message.

@seeforschauer seeforschauer marked this pull request as draft March 22, 2022 13:57
@seeforschauer seeforschauer marked this pull request as ready for review March 22, 2022 15:04
@seeforschauer seeforschauer requested a review from AlekSi March 22, 2022 15:04
@AlekSi AlekSi enabled auto-merge (squash) March 22, 2022 15:56
@AlekSi AlekSi disabled auto-merge March 22, 2022 15:56
@AlekSi AlekSi merged commit 8219693 into FerretDB:main Mar 22, 2022
@seeforschauer seeforschauer deleted the projection-simple branch March 24, 2022 13:43
@AlekSi AlekSi added the code/enhancement Some user-visible feature could work better label Apr 4, 2022
@AlekSi AlekSi changed the title Projection add error codes when inclusion and exclusion is used Return correct error codes for projections Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/enhancement Some user-visible feature could work better trust PRs that can access Actions secrets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants