Skip to content

Include response in the exception of an invalid routing response #764

@SimonBradley1993

Description

@SimonBradley1993

Recently my team had issues with our optimisation process using Vroom and OSRM. After some investigation it turned out that our infrastructure was timing out a request that Vroom makes to OSRM - which took longer than the default 15 seconds.

To identify this root cause we modified Vroom to include the actual response that was received.

It would be really great to have this change included so we can continue to use the tagged version of Vroom.

The changes that were needed were in http_wrapper.cpp with the following code block :

// Removing headers.
  auto start = response.find("{");
  if (start == std::string::npos) {
    throw RoutingException("Invalid routing response: " + response);
  }
  auto end = response.rfind("}");
  if (end == std::string::npos) {
    throw RoutingException("Invalid routing response: " + response);
  }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions