zaquestion / lab

Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab
https://zaquestion.github.io/lab
Creative Commons Zero v1.0 Universal
1.1k stars 103 forks source link

lab: Provide a better "Project Not Found" error message #800

Closed prarit closed 2 years ago

prarit commented 2 years ago

Currently lab outputs this error when an unknown project is found:

"GitLab project not found, verify you have access to the requested resource".

While this error does match the webUI, it doesn't provide enough information to debug the error. The webUI in this case still provides the name of the unknown project where lab only outputs the generic warning.

Update the "Project Not Found" error with the unknown project name.

Signed-off-by: Prarit Bhargava prarit@redhat.com

codecov[bot] commented 2 years ago

Codecov Report

Merging #800 (c599741) into master (81de4e1) will decrease coverage by 0.13%. The diff coverage is 47.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #800      +/-   ##
==========================================
- Coverage   54.77%   54.63%   -0.14%     
==========================================
  Files          77       77              
  Lines        5678     5698      +20     
==========================================
+ Hits         3110     3113       +3     
- Misses       2288     2299      +11     
- Partials      280      286       +6     
Impacted Files Coverage Δ
cmd/issue_edit.go 72.32% <44.44%> (-2.68%) :arrow_down:
cmd/mr_edit.go 61.05% <44.44%> (-1.25%) :arrow_down:
cmd/mr_create.go 73.99% <100.00%> (-1.01%) :arrow_down:
cmd/ci_run.go 63.63% <0.00%> (-1.99%) :arrow_down:
internal/git/git.go 55.02% <0.00%> (-1.79%) :arrow_down:
cmd/util.go 74.06% <0.00%> (-0.87%) :arrow_down:
cmd/fork.go 63.15% <0.00%> (+5.26%) :arrow_up:

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 25678df...c599741. Read the comment docs.

prarit commented 2 years ago

@zampierilucas @bmeneg that's better :)