short icon indicating copy to clipboard operation
short copied to clipboard

Emit errors through Search API

Open Coteh opened this issue 4 years ago • 2 comments

Fixes #865

Tests not added yet, so this will be in draft until they're added.

Emit errors through search API and add new types for unknown resource and user not provided.

TODO

  • [x] Add test for user not provided
  • [x] Add tests for unknown resource
    • [x] one unknown resource
    • [x] ~two unknown resources~ edit: redundant, other two cover it
    • [x] one unknown resource and one known resource
  • [x] Decide whether errors should be emitted as text or as JSON
  • [x] Decide whether to fix two warnings reported by GoLand in handle/search.go (edit: going to skip them, beyond the scope of this PR imo)

Coteh avatar Aug 21 '20 16:08 Coteh

Codecov Report

Merging #1000 into master will increase coverage by 0.04%. The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1000      +/-   ##
==========================================
+ Coverage   52.58%   52.62%   +0.04%     
==========================================
  Files         142      142              
  Lines        3564     3576      +12     
  Branches      168      168              
==========================================
+ Hits         1874     1882       +8     
- Misses       1623     1627       +4     
  Partials       67       67              
Flag Coverage Δ
#golang 72.00% <75.00%> (-0.03%) :arrow_down:
#typescript 22.40% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
backend/app/usecase/search/search.go 86.95% <75.00%> (-2.37%) :arrow_down:

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 394a65f...54a7071. Read the comment docs.

codecov[bot] avatar Aug 21 '20 20:08 codecov[bot]

Please hold this PR. We need to discuss what are the expected behaviors.

magicoder10 avatar Aug 28 '20 06:08 magicoder10