When user is calling PUT api on deleted attribute assets throws 403 error instead of BAD_REQUEST

XMLWordPrintable

      Issue Summary

      When customer is calling PUT api to update object which have deleted attribute in payload, then assets is returning 403 FORBIDDEN error - Sorry, you do not have permission to perform this action.

      Steps to Reproduce

      1. Create a text type attribute in object type.
      2. Use API : GET/objecttype/{id}/attributes to get the attribute ID
      3. Delete the attribute
      4. Now try to update the Object PUT/object/{id} available in object type with deleted attribute ID in request body. Below error is observed.

       

      Expected Results

      Actual error message is misleading as user thinks about the permissions rather than incorrect attribute ID / BAD_REQUEST
       

      Actual Results

      { "errorMessages": [ "Sorry, you do not have permission to perform this action." ], "errors": {} }

      Short recording: https://www.loom.com/share/25c20b22138f46d9a9c5c5adeba9effc

      Workaround

      Remove deleted attribute from Payload. 

            Assignee:
            Dhruv Garg
            Reporter:
            Deepak Sengar
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: