• Get rail company list handler

    Parameters

    • railCompanyService: Pick<RailCompanyDataService, "listPaginatedRailCompanies" | "normalizeRailCompanyResponses">

      injected service use to handle the rail related operations

    • paginationConfiguration: PaginationConfigurations
    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

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

    Returns Promise<adapter.AdapterHandlerResponse>

    200 Status Ok

    Description

    This handler is used to get a list of rail company by applying the following steps in sequence:

    1. Parse the query to get the pagination options (util.parsePaginatedListQuery)

    2. Check if the pagination options are valid

    3. Get the rail company list (railService.listPaginatedRailCompanies)

    4. Return the rail company list

    Throws

    400 NBError Bad Request

    • error when parse paginated list query, ${error.message}

    Throws

    500 NBError Internal Server Error

    • error when parse paginated list query, ${error.message}

Generated using TypeDoc