Uploaded image for project: 'Document Management System'
  1. Document Management System
  2. DMS-1875

CBAT: API response codes. Activate and Deactivate company

    Details

    • Type: New Feature
    • Status: To Do
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Labels:
      None

      Description

      "Activate and Deactivate company" section and about API response codes. We need to differentiate when a company exists vs invalid payload content. Currently, both cases return 400 code which is not compliant with HTTP standards

        Attachments

          Activity

          Hide
          Joris.Berthelot Joris Berthelot (Inactive) added a comment - - edited

          Hi Rohan J Khandave,

          We get account did into header ,we try to validate those header value when validation fails , returns bad request. If you still want to return Not Found (404). We can take this change. But this change will get applicable for all DMS API's.

          Validation means user data input validation: if data is missing, empty, null, zero, not parseable, etc. -> return 400.

          If the data format is valid but when looking up into your database, there's no match -> return 404.

          This behavior should be indeed enforce on all API endpoints. There is very strong difference between "invalid input" and "missing requested resource".

          DMS has validation , company name must be unique for active companies, system validate company names among all active companies. So when some one try to activate company system validate any other active company has same name or not.

          This is a weird logic but why not. That case should return 409 and then we will ignore on our side meaning the company has been already deactivated.

          Thanks for your patience!

          Show
          Joris.Berthelot Joris Berthelot (Inactive) added a comment - - edited Hi Rohan J Khandave , We get account did into header ,we try to validate those header value when validation fails , returns bad request. If you still want to return Not Found (404). We can take this change. But this change will get applicable for all DMS API's. Validation means user data input validation: if data is missing, empty, null, zero, not parseable, etc. -> return 400. If the data format is valid but when looking up into your database, there's no match -> return 404. This behavior should be indeed enforce on all API endpoints. There is very strong difference between "invalid input" and "missing requested resource". DMS has validation , company name must be unique for active companies, system validate company names among all active companies. So when some one try to activate company system validate any other active company has same name or not. This is a weird logic but why not. That case should return 409 and then we will ignore on our side meaning the company has been already deactivated. Thanks for your patience!
          Hide
          Joris.Berthelot Joris Berthelot (Inactive) added a comment -

          Hi Samir,

          I see this card is being spilled over again and again from a sprint to another. Can we get this done asap please?

          Thanks,

          cc. Amrendra Kumar

          Show
          Joris.Berthelot Joris Berthelot (Inactive) added a comment - Hi  Samir , I see this card is being spilled over again and again from a sprint to another. Can we get this done asap please? Thanks, cc. Amrendra Kumar
          Hide
          Joris.Berthelot Joris Berthelot (Inactive) added a comment -

          Any update on this, please?

          cc Amrendra Kumar

          Show
          Joris.Berthelot Joris Berthelot (Inactive) added a comment - Any update on this, please? cc Amrendra Kumar
          Hide
          samir Samir added a comment -

          Hi Joris Berthelot,

          Can we have a call to discuss this. Please let me know your availability?

          Regards,

          Samir

          Show
          samir Samir added a comment - Hi Joris Berthelot , Can we have a call to discuss this. Please let me know your availability? Regards, Samir
          Hide
          Joris.Berthelot Joris Berthelot (Inactive) added a comment -

          Hello,

          Has this card been fixed already? Because I'm getting 404 now when a system seems to not exist. Could you confirm?

          Thanks!

          Show
          Joris.Berthelot Joris Berthelot (Inactive) added a comment - Hello, Has this card been fixed already? Because I'm getting 404 now when a system seems to not exist. Could you confirm? Thanks!

            People

            Assignee:
            samir Samir
            Reporter:
            samir Samir
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Time Spent - 3h Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - 3h Remaining Estimate - 1h
                3h