def pathParameterOrThrow()

in src/main/scala/com/gu/invoicing/common/HttpHelper.scala [8:13]


  def pathParameterOrThrow(request: APIGatewayProxyRequestEvent, parameterName: String): String = {
    request.getPathParameters.asScala.getOrElse(
      parameterName,
      throw new RuntimeException(s"Parameter $parameterName was missing from the path ${request.getPath}"),
    )
  }