Coder Social home page Coder Social logo

More specific JSON errors about awe HOT 2 CLOSED

MrCreosote avatar MrCreosote commented on July 20, 2024
More specific JSON errors

from awe.

Comments (2)

wtangiit avatar wtangiit commented on July 20, 2024

This fails at json unmarshal. The workflow doc parsing functionality are
relying on the json unmarshal function in the standard Go library
(encoding/json) to convert the json stream to a Go struct, and the error
msg is reported by that library function. I think it is not easy for now to
report finer-grained error msg if we are using the standard Go library .

Thus for now, we have to make sure the job template follows the json
specification in the document. On the roadmap, we will have better workflow
parsing framework, that will have better workflow checking and debug
capability.

On Tue, Jun 10, 2014 at 3:28 PM, MrCreosote [email protected]
wrote:

Would it be possible to give the location of the error in the JSON when
JSON parse errors occur? For example:

crusherofheads@icrushdeheads:~/awe_sec$ curl -X POST -F
[email protected] http://localhost:7080/job
{"status":400,"data":null,"error":["json: cannot unmarshal number into Go
value of type string"]}

That's really hard to debug. In this case it turns out that the depends
fields in tasks must be strings, not numbers, which was the cause of the
error.


Reply to this email directly or view it on GitHub
#236.

from awe.

wgerlach avatar wgerlach commented on July 20, 2024

This is a known issue in Go, see https://code.google.com/p/go/issues/detail?id=6716

from awe.

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.