Giter Club home page Giter Club logo

node-sql's Introduction

Hi there ๐Ÿ‘‹

  • ๐Ÿ”ญ Iโ€™m currently working on bringing Mortgage software into the modern era.
  • ๐ŸŒฑ Iโ€™m currently learning all kinds of stuff. Some specific things: Vector Databases & LLM's.
  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on nothing.
  • ๐Ÿ’ฌ Ask me about how awesome Javascript is.
  • ๐Ÿ“ซ How to reach me: just holler or find me on LinkedIn.
  • โšก Fun fact: I don't do much on public Github because I don't get paid for it.

node-sql's People

Contributors

moshekarmel1 avatar

Stargazers

 avatar

Watchers

 avatar

node-sql's Issues

nodeSql error functions are being called twice

Hello, I am noticing a problem when I am calling a SQL proc and it errors. For instance, let's say that my proc 'BooksInsert' expects 5 params but I only provide 4...I would expect an error to be thrown. If I call the following code:

nodeSql.sproc('GLIWeb.dbo.BooksInsert', req.body, config, function(err, result){
if (err) {
console.log('I have an error', err);
return res.status(500).send(err);
}
else {
console.log('i do not have an error', err);
res.status(201).json(result);
}
})
nodeSql is running through the callback with err = NULL (thus hitting "i do not have an error" section) and then it immediately runs again but this time err is not NULL so it gets into the "I have an error" section. However, since the response status has already been set (because of the initial runthrough), node is now throwing the "Cant set headers after they are sent" error.

Am I missing something? Why is nodeSql running this twice (once without an error and then another time with an error)?

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.