Code Monkey home page Code Monkey logo

rdf-body-parser's People

Contributors

bergos avatar ktk avatar pmcb55 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

kaefer3000 pmcb55

rdf-body-parser's Issues

Exit more gently on parser errors

Hi,
when I get a parser error as

/home/...my-project.../node_modules/n3/lib/N3Util.js:49
      throw new Error(literal + ' is not a literal');
      ^

Error:  is not a literal
    at Function.N3Util.getLiteralLanguage (/home/...my-project.../node_modules/n3/lib/N3Util.js:49:13)
    at toRdfNode (/home/...my-project.../node_modules/rdf-parser-n3/index.js:60:30)
    at pushTriple (/home/...my-project.../node_modules/rdf-parser-n3/index.js:80:11)
    at Object._callback (/home/...my-project.../node_modules/rdf-parser-n3/index.js:89:7)
    at Object.N3Parser._readPunctuation (/home/...my-project.../node_modules/n3/lib/N3Parser.js:454:12)
    at Object.N3Parser._readDataTypeOrLang (/home/...my-project.../node_modules/n3/lib/N3Parser.js:296:41)
    at /home/...my-project.../node_modules/n3/lib/N3Parser.js:683:35
    at Object.N3Lexer._tokenizeToEnd (/home/...my-project.../node_modules/n3/lib/N3Lexer.js:262:7)
    at Immediate._onImmediate (/home/...my-project.../node_modules/n3/lib/N3Lexer.js:318:38)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

my application exits immediately. It would be great if the body parser would treat this error more gently, like answering the errorneous HTTP request with a 400 response and not killing the application. Cheers!

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.