onebeyond / generator-systemic

A yeoman-based template to generate a systemic microservice
MIT License
24 stars 10 forks source link

Feat/default http error handling #41

Closed kevinccbsg closed 4 years ago

kevinccbsg commented 4 years ago

This PR includes the error-handler-module package to close #17 .

This package is maintained by Guidesmiths Team and has been used in a lot of Guidesmiths projects and I also have been using it in some other open-source projects. You can check the docs here.

In the PR it was included an endpoint as an example of how the package works.

kevinccbsg commented 4 years ago

I like it but there are a couple of things that I would change:

  • the GET /__/error endpoint does not return a 200 ok so we should change its docs

@MatteoDiPaolo It does not return 200 OK Json as this throws a bad request error in that endpoint to show how to use that package.

  • there is a pending PR #40 that is going to replace the express-swagger-generator with swagger-endpoint-validator so maybe we should wait for it to be merged and then get rid of the JSDOCS on top of the /__/error endpoint and document that endpoint using the yaml

Sure, we should wait for the other PR to be merged 👍

MatteoDiPaolo commented 4 years ago

@kevinccbsg I'm going to close this PR since the changes that it would have add have already been added by this other PR: #65