Coder Social home page Coder Social logo

Comments (11)

goekay avatar goekay commented on July 17, 2024 1

working on it. can you tell me what caused the exception? maybe there is an issue with handling of meter values?

from steve.

JavaIsJavaScript avatar JavaIsJavaScript commented on July 17, 2024 1

I stumbled across this whilst testing MeterValues:

[4,"jKg4ShEDt4PxSv3J4291tioh2ES2K3dV","InternalError","Internal services failed while processing of the payload","SQL [insert into
stevedb.connector_meter_value (connector_pk, transaction_pk, `value_timesta..."]

But this was because i was using a transactionId that was not related to the Charge Point/request, after using a correct transactionId related to the Charge Point/request it just worked perfectly.

This "InternalError" happens aswell if the transactionId sent by the Charge Point in the MeterValues.req does not exist

from steve.

goekay avatar goekay commented on July 17, 2024 1

EDIT: As well as, the entry "errorDetails" should be an object and not a string as the server returns.

@nuno407 i know. my commit fixed this and only this, as i explained in my previous comment

from steve.

goekay avatar goekay commented on July 17, 2024

alright.

from steve.

nuno407 avatar nuno407 commented on July 17, 2024

Thank you @JavaIsJavaScript.
That's correct!

from steve.

goekay avatar goekay commented on July 17, 2024

This "InternalError" happens aswell if the transactionId sent by the Charge Point in the MeterValues.req does not exist

@JavaIsJavaScript are you sure about this? During my tests MeterValues.req without a transaction id do not cause an internal error.

from steve.

JavaIsJavaScript avatar JavaIsJavaScript commented on July 17, 2024

Yeah, without transactionId works, but if the transactionId in the request doesn't exist in the database i ment

from steve.

goekay avatar goekay commented on July 17, 2024

ah okay, then it's not our problem :)

from steve.

nuno407 avatar nuno407 commented on July 17, 2024

But @goekay,
The error response still does not match the specification. In this case a "PropertyConstraintViolation" as defined in OCPP-J v1.6 should be throw right?

EDIT: As well as, the entry "errorDetails" should be an object and not a string as the server returns.

"errorDetails": {
    "type": "object"
}

Thank you for the help,
nuno

from steve.

goekay avatar goekay commented on July 17, 2024

technically speaking, you are right. i only fixed the bug, that errorDetails was handled as a simple string and not json object. it was there for years and was overlooked.

but the fact, whether a transaction id exists or not, is checked within the database (foreign key constraint). if it does not exist, we get in the application a chain of exceptions: SQLIntegrityConstraintViolationException in BatchUpdateException in DataAccessException. at this point, it's really hard to find out what went why wrong, other than looking at the error string returned by the database.

this is one of the reasons, why we cannot use some of the finer grained error codes.

from steve.

nuno407 avatar nuno407 commented on July 17, 2024

Thank you @goekay !

from steve.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.