#1491 copr-cli: "Error: Request wasn't successful, there is probably a bug in the API code."
Closed: Fixed 3 years ago by praiskup. Opened 3 years ago by petersen.

It seems too easy to trigger such errors from copr-cli with user input errors.

$ copr get-chroot blah/asdfsad

Something went wrong:
Error: Request wasn't successful, there is probably a bug in the API code.

I guess the error should really be something like "no such project found".


Metadata Update from @frostyx:
- Issue assigned to frostyx

3 years ago

Metadata Update from @praiskup:
- Issue tagged with: bug

3 years ago

Hello @petersen,
thank you for the feedback.

I guess the error should really be something like "no such project found".

Indeed.

I improved the error handling in PR#1494 and now it returns

$ copr get-chroot blah/asdfsad

Something went wrong:
Error: Missing argument ownername

because the parameter format should be user/project/chroot, and with that

$ copr get-chroot blah/asdfsad/blablah

Something went wrong:
Error: Project blah/asdfsad does not exist.

@frostyx Maybe also update the man page, this is wrong

coprchroot::  
    Path to a project chroot as owner/project/chroot or project/chroot

Good catch @schlupov, thanks. Updated.

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #1494 Merged 3 years ago