senecajs / seneca

A microservices toolkit for Node.js.
http://senecajs.org
MIT License
3.96k stars 314 forks source link

Error Handling Rethink #398

Open mcdonnelldean opened 8 years ago

mcdonnelldean commented 8 years ago

Error handling needs a rethink, my thoughts here,

A lot of why error handling is bad is due to cryptic messages. We need to rethink the sort of messages we are returning. Gitter is littered with people asking about gate executor timeout questions because they are basically unreadble if you don't know the code.

We are also way to safe in my opinion. We shouldn't be trapping errors, the system ends up in very peculiar states. I'm a firm believer in fail fast and restart. From gitter and issues it does seem people's expectation is fail fast, we really need to consider this.

Bear in mind, our own tests are in the state they are in due to weird error handling, if we had untrapped exceptions and proper err flow we could cut our test suite in half and end up with more coverage.

Contributors and users, please feel free to add pain points and constructive feedback.

s9tpepper commented 5 years ago

Sorry, my email client messed up my view.

If you have timeouts a lot then something is taking too long, you should adjust the timeout settings on your Seneca instance so the actions have adequate time to perform whatever you are doing in your actions.

If you are using default web transport, you must change the transport timeout as well.

-omar

On Sun, May 12, 2019 at 4:38 PM GL notifications@github.com wrote:

@s9tpepper https://github.com/s9tpepper timeouts are common.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/senecajs/seneca/issues/398#issuecomment-491638749, or mute the thread https://github.com/notifications/unsubscribe-auth/AACHMROZPCSTG7JEYDVVBTDPVCTANANCNFSM4CAVOW6A .

-- Omar Gonzalez s9tpepper@apache.org

s9tpepper commented 5 years ago

Something like:

const seneca = Seneca({ timeout: 10000, // 10 secs transport: { web: 10000, tcp: 10000 } })

-omar

On Sun, May 12, 2019 at 4:38 PM GL notifications@github.com wrote:

@s9tpepper https://github.com/s9tpepper timeouts are common.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/senecajs/seneca/issues/398#issuecomment-491638749, or mute the thread https://github.com/notifications/unsubscribe-auth/AACHMROZPCSTG7JEYDVVBTDPVCTANANCNFSM4CAVOW6A .

-- Omar Gonzalez s9tpepper@apache.org