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

Question on error handling #293

Open
andig opened this issue Sep 7, 2024 · 0 comments
Open

Question on error handling #293

andig opened this issue Sep 7, 2024 · 0 comments

Comments

@andig
Copy link
Contributor

andig commented Sep 7, 2024

Hope it is ok to ask this question. I couldn't find this in the docs:

CS functions take a callback that already receives an error. What is the meaning of that received error and how does it relate to the error returned by the CS function? Example:

GetCompositeSchedule(clientId string, callback func(*smartcharging.GetCompositeScheduleConfirmation, error), connectorId int, duration int, props ...func(request *smartcharging.GetCompositeScheduleRequest)) error

CS handlers allow to return a confirmation and an error. What is the meaning of the returned error: is it in any way relayed to the CP? I.e. does returning an error create some sort or error response that is returned? Example:

OnMeterValues(chargePointId string, request *MeterValuesRequest) (confirmation *MeterValuesConfirmation, err error)

I'm not sure if the answers are obvious and I'm just missing them. If not it might nice to add them to the docs of CentralSystemHandler and ChargePointHandler in https://pkg.go.dev/github.com/lorenzodonini/ocpp-go@v0.18.0/ocpp1.6.

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

No branches or pull requests

1 participant