• Delete Attribute Handler

    Parameters

    • attributeService: Pick<AttributeDataService, "deleteAttribute">

      injected service use to handle the attribute related operations

    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

      request context [headers, body, params, query].

      • params.attributeId is required

    Returns Promise<adapter.AdapterHandlerResponse>

    204 Status No Content

    Description

    This handler is used to delete an attribute by applying the following steps in sequence:

    1. Get the attributeId from params

    2. Delete the attribute (attributeService.deleteAttribute)

    3. Return the status code 204

    Throws

    404 NBError Not Found

    • Attribute ${attributeId} not found

    Throws

    500 NBError Internal Server Error

    • Error happen when delete attribute ${attributeId} from database

Generated using TypeDoc