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

minor fixes #426

Closed
wants to merge 12 commits into from
Closed

minor fixes #426

wants to merge 12 commits into from

Conversation

drc38
Copy link
Contributor

@drc38 drc38 commented Mar 6, 2023

According to the notes I assume this is incorrect and should be NotImplemented?

PratikBodawala
PratikBodawala previously approved these changes Mar 26, 2023
tropxy
tropxy previously approved these changes Apr 18, 2023
@drc38 drc38 dismissed stale reviews from tropxy and PratikBodawala via 7646e42 April 18, 2023 16:48
@drc38 drc38 requested a review from tropxy April 18, 2023 17:04
@drc38
Copy link
Contributor Author

drc38 commented Sep 11, 2023

@OrangeTux a couple of small fixes for review

@OrangeTux
Copy link
Collaborator

Table 7 of the Open Charge Point Protocol JSON 1.6, OCPP-J 1.6 Specification lists all error codes with a short description.

  • NotSupported - Requested Action is not known by receiver
  • NotImplemented - Requested Action is recognized but not supported by the receiver charge_point.py:175 can indicate both problems.

Trying to send a request with action "InvalidAction" triggers this code path. In this case, a NotSupportedError would be fitting.

However, the code path is also executed when the receiver receives a request for an action the receiver doesn't implement. For example, if a charger receives a "GetDiagnostics" request without supporting this feature. Now NotImplementedError would be suitable.

A while ago, we changed the error type from "NotImplementedErrortoNotSupportedError`. See c6e7e48

I'm hesitant to revert that change by approving this PR. Instead, some code should be include to distinguish between 2 scenarios I described and raise the appropriate error.

@drc38 drc38 changed the title fix not implemented minor fixes Sep 13, 2023
@drc38
Copy link
Contributor Author

drc38 commented Sep 13, 2023

Table 7 of the Open Charge Point Protocol JSON 1.6, OCPP-J 1.6 Specification lists all error codes with a short description.

  • NotSupported - Requested Action is not known by receiver
  • NotImplemented - Requested Action is recognized but not supported by the receiver charge_point.py:175 can indicate both problems.

Trying to send a request with action "InvalidAction" triggers this code path. In this case, a NotSupportedError would be fitting.

However, the code path is also executed when the receiver receives a request for an action the receiver doesn't implement. For example, if a charger receives a "GetDiagnostics" request without supporting this feature. Now NotImplementedError would be suitable.

A while ago, we changed the error type from "NotImplementedErrortoNotSupportedError`. See c6e7e48

I'm hesitant to revert that change by approving this PR. Instead, some code should be include to distinguish between 2 scenarios I described and raise the appropriate error.

Cheers, I wasn't aware of the history. I have reverted and amended the comment to align with the choice of using the NotSupportedError.

@Jared-Newell-Mobility
Copy link
Contributor

Jared-Newell-Mobility commented Oct 18, 2023

@drc38 - I see that the change in the comment field is valid, could you please recreate this PR, having it branched off master?thanks
@OrangeTux comment could also be implemented maybe in a different PR?

@drc38 drc38 closed this Oct 19, 2023
@drc38 drc38 mentioned this pull request Oct 19, 2023
Jared-Newell-Mobility pushed a commit that referenced this pull request Oct 19, 2023
@Jared-Newell-Mobility new PR from the master branch, for background see
#426
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants