Uploaded image for project: 'Stratos'
  1. Stratos
  2. STRATOS-491

Exception shown in the CLI instead of the proper message

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0.0 Alpha
    • Fix Version/s: 4.0.0
    • Component/s: CLI
    • Labels:
      None

      Description

      In the "list-subscribed-cartridges" command [errorCode= 400, errorMessage= Cannot find any subscribed Cartridge, matching the given string: null] is shown when there are no subscribed cartridges

        Activity

        Hide
        nirmal Nirmal Fernando added a comment - - edited

        Hi Vimuth,

        Why do you think this as an issue? Don't you think that back-end should send an error instead of an empty list of Cartridges in that case? I felt, it's good to send an error message, for following reason.

        IMO CLI shouldn't check anything and act accordingly, but should simply delegate the request to REST API and then delegate the response back to the user.

        But others may have other thoughts. Let's discuss here.

        Show
        nirmal Nirmal Fernando added a comment - - edited Hi Vimuth, Why do you think this as an issue? Don't you think that back-end should send an error instead of an empty list of Cartridges in that case? I felt, it's good to send an error message, for following reason. IMO CLI shouldn't check anything and act accordingly, but should simply delegate the request to REST API and then delegate the response back to the user. But others may have other thoughts. Let's discuss here.
        Hide
        vimuth Vimuth Fernando added a comment - - edited

        Udara asked me to open this. The idea was that there should be a
        message such as "There are no subscribed cartridges" rather than showing
        the full error message.


        Thanks,
        Vimuth Dinuka Fernando

        Software Engineering Intern,
        WSO2 Inc.
        Mobile - 0777559890

        Show
        vimuth Vimuth Fernando added a comment - - edited Udara asked me to open this. The idea was that there should be a message such as "There are no subscribed cartridges" rather than showing the full error message. – Thanks, Vimuth Dinuka Fernando Software Engineering Intern, WSO2 Inc. Mobile - 0777559890
        Hide
        udaraliyanage Udara Liyanage added a comment -

        From users perspective it is not an error. It is better to show an message
        like "You haven't any subscribed cartridges currently....". As I can
        remember list-cartridges shows a message like that.

        Touched, not typed. Erroneous words are a feature, not a typo.

        Show
        udaraliyanage Udara Liyanage added a comment - From users perspective it is not an error. It is better to show an message like "You haven't any subscribed cartridges currently....". As I can remember list-cartridges shows a message like that. Touched, not typed. Erroneous words are a feature, not a typo.
        Hide
        nirmal Nirmal Fernando added a comment -

        We have fixed this in the master, cannot find the exact commit revisions.

        Show
        nirmal Nirmal Fernando added a comment - We have fixed this in the master, cannot find the exact commit revisions.

          People

          • Assignee:
            chanaka@wso2.com Chanaka Jayasena
            Reporter:
            vimuth Vimuth Fernando
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development