Skip to content

Extraindo tratamento de erros para um middleware#137

Merged
PauloGoncalvesBH merged 3 commits intoServeRest:trunkfrom
gabriel-pinheiro:trunk
Oct 1, 2020
Merged

Extraindo tratamento de erros para um middleware#137
PauloGoncalvesBH merged 3 commits intoServeRest:trunkfrom
gabriel-pinheiro:trunk

Conversation

@gabriel-pinheiro
Copy link
Copy Markdown
Contributor

Description

Extraindo o tratamento de erros dos controllers para um error handler

How can the user experience this change?

Não aplicável, foi um refactor

Documentation

Sem mudanças de contrato

Related Issues

Closes #120

PR Tasks

  • Has been related to an issue?
  • Have tests been added/updated? // Foi um refactor, nenhuma lógica nova foi adicionada
  • Has Aglio documentation been added/updated? // Nenhum contrato foi alterado

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Oct 1, 2020

Codecov Report

Merging #137 into trunk will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             trunk      #137   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        23    +1     
  Lines          389       380    -9     
=========================================
- Hits           389       380    -9     
Impacted Files Coverage Δ
src/utils/constants.js 100.00% <ø> (ø)
src/app.js 100.00% <100.00%> (ø)
src/controllers/carrinhos-controller.js 100.00% <100.00%> (ø)
src/controllers/login-controller.js 100.00% <100.00%> (ø)
src/controllers/produtos-controller.js 100.00% <100.00%> (ø)
src/controllers/usuarios-controller.js 100.00% <100.00%> (ø)
src/middlewares/error-handler.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c9794f2...39bc9e1. Read the comment docs.

Copy link
Copy Markdown
Member

@PauloGoncalvesBH PauloGoncalvesBH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Achei apenas um pequeno ajuste a ser feito.
No geral o PR está muito bom, ótima contribuição que você fez, e principalmente porque encontrou sozinho esse ponto de melhoria.

Copy link
Copy Markdown
Member

@PauloGoncalvesBH PauloGoncalvesBH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PauloGoncalvesBH
Copy link
Copy Markdown
Member

@all-contributors please add @gabriel-pinheiro for code and ideas

@allcontributors
Copy link
Copy Markdown
Contributor

@PauloGoncalvesBH

I've put up a pull request to add @gabriel-pinheiro! 🎉

@PauloGoncalvesBH
Copy link
Copy Markdown
Member

Essa implementação aumentou o score do teste de mutação do arquivo app.js de 64,29% para 75,47%

@PauloGoncalvesBH PauloGoncalvesBH merged commit 3532c2a into ServeRest:trunk Oct 1, 2020
@PauloGoncalvesBH
Copy link
Copy Markdown
Member

🎉 This PR is included in version 2.10.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implementar error handler

3 participants