Skip to content

Handle routing engine http statuses #1083

@FFKL

Description

@FFKL

Hello! I migrated vroom from v1.13.0 to v1.14.0 and got a Missing durations error. Then I discovered that the problem is connected to the requirement of adding the postfix ors/v2 to the host setting. But the main problem is that vroom doesn't handle any HTTP status codes, so it's hard to debug such errors. Perhaps a good option would be to throw a RoutingException?

The status just drops

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

and I received an error related to the request body

if (!json_result.HasMember(_matrix_durations_key.c_str())) {
throw RoutingException("Missing " + _matrix_durations_key + ".");
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions