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

Handle of invalid DateTime when format check fails #808

Closed
jannejy opened this issue Sep 26, 2024 · 0 comments · Fixed by #822
Closed

Handle of invalid DateTime when format check fails #808

jannejy opened this issue Sep 26, 2024 · 0 comments · Fixed by #822
Assignees

Comments

@jannejy
Copy link
Contributor

jannejy commented Sep 26, 2024

OCPP Version

OCPP2.0.1

Describe the problem

Now while constructing DateTime from string if the format check fails, only a log error line is printed and then the request is processed with the invalid DateTime. For example, this happens when GetLogRequest is sent with empty-string timestamps. This applies as well to operator=

Describe your solution

Instead of printing the log line, throw a custom exception, process it and send CallError with verbose description (invalid string format to create DateTime, use RFC 3339 date format)

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant