ockam icon indicating copy to clipboard operation
ockam copied to clipboard

`ockam project ticket` should return a proper error message

Open etorreborre opened this issue 1 year ago • 6 comments

Observed behavior

Reset your project

ockam reset -y

and try to create a project ticket

❯ ockam project ticket                                                                                                                                                                                                                                                                                                                                                                                               OCK500

  × unknown project default
  help: Please report this issue, with a copy of your logs, to https://github.com/build-trust/ockam/issues

  Version 0.90.0, hash: 78760ecfc8a9fb5b49b785f5e1a5ce0560e3bce3

Steps to reproduce

An error 500 is return but the problem is simply that the current user must enroll with ockam enroll first.

Expected behavior

Return a user error when a project does not exist for an ockam project command and suggest to run ockam enroll first

Ockam Version

0.90.0


We love helping new contributors! ❤️ If you have questions or need help as you explore, please join us on Discord. If you're looking for other issues to contribute to, please checkout our good first issues.

etorreborre avatar Jul 04 '23 15:07 etorreborre

Hi @etorreborre,

I just want to clarify. Do you want a PR to handle any relevant project subcommand where the project name is not found, or just the ticket subcommand?

Thanks!

DerekStrickland avatar Jul 10 '23 19:07 DerekStrickland

Hi @DerekStrickland I haven't tested the other project commands and it is indeed probable that they return the same error. So please address them all :-).

etorreborre avatar Jul 11 '23 07:07 etorreborre

I want to work on this. Being a new contributor can anyone tell me what files to look into?

guha-rahul avatar Oct 29 '23 10:10 guha-rahul

@guha-rahul Here are some good starting points:

  • https://github.com/build-trust/ockam/blob/develop/implementations/rust/ockam/ockam_command/src/project/ticket.rs
  • https://github.com/build-trust/ockam/blob/develop/implementations/rust/ockam/ockam_command/src/enroll/command.rs#L42

nazmulidris avatar Oct 29 '23 22:10 nazmulidris

@guha-rahul I just assigned you this issue. Please let us know if you have any questions as you explore. You can also ask questions on the contributors discord https://discord.gg/RAbjRr3kds

nazmulidris avatar Oct 29 '23 22:10 nazmulidris

Thanks , will look into them right away!

guha-rahul avatar Oct 30 '23 08:10 guha-rahul