Uploaded image for project: 'Configuration Persistence Service'
  1. Configuration Persistence Service
  2. CPS-2111

Change HttpStatus code for failed CmHandle registrations

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: High High
    • None
    • None
    • CPS-Core, NCMP
    • None

      Currently if we get an error during CmHandle registration (e.g. a cmhandle id already exists) the server returns an HTTP 500 response. Which indicates an unhandled exception instead of a bad request.

      The response status should be changed to 2xx or 4XX.

      The current Http Status: 500 Server Error including failed cm handles with Cps error code and text. 

      How?

      • The new HttpStatus code: TBD
      • The new HttpStatus code will be applicable only for cm handle batch create operation handled in NetworkCmProxyInventoryController.java
      • The methods that handle HttpStatus.INTERNAL_SERVER_ERROR should have warn level logging with the exception stack trace in NetworkCmProxyRestExceptionHandler.java and  CpsRestExceptionHandler.java classes.

      Out of Scope

      • There will be no change on the existing CPS error codes.

      A/C

      • Demo

       

            Unassigned Unassigned
            leventecsanyi Levente Csanyi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: