Skip to content

Traffic block not working with routes library due to Google error response update #2382

Closed
@cocarrig

Description

@cocarrig

Describe the bug
Google Routes library API keys are not working for the Traffic block. Currently the traffic block is configured to automatically negotiate between the Directions(legacy) API library and the newer Routes API library. The Block will attempt as the Directions API library, and when faced with the expected error:
This API project is not authorized to use this API.' will fall back to routes.

Recently Google updated this error to the following, and the block design will need to be udpated to account for it:
You're calling a legacy API, which is not enabled for your project. To get newer features and more functionality, switch to the Places API (New) or Routes API. Learn more: https://developers.google.com/maps/legacy#LegacyApiNotActivatedMapError

To Reproduce
Steps to reproduce the behavior:

  1. Access custom screen as Essential or Plus account
  2. Create traffic block
  3. Add API key with Routes library, with addresses
  4. Observe error

Expected behavior
Block should acknowledge updated error responses from google to begin to try Routes library.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions