# Requested resource was not found Error Message

**URL:** <https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198>\
**Category:** App development\
**Created:** [December 10, 2020, 3:33pm UTC](https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198 "2020-12-10T15:33:15Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike\_yi](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@mike\_yi](https://opendataforum.transport.nsw.gov.au/u/mike_yi)\
**Post date:** [December 10, 2020, 3:33pm UTC](https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198/1 "2020-12-10T15:33:15Z")

</div>

I used google map to get the polyline, and the [Interactive Polyline Encoder Utility](https://developers.google.com/maps/documentation/utilities/polylineutility) can be used to display it on the map, and it is obvious that I am passing the M1 toll highway.  
However, when I passed to the Toll Calculator API(v2), it returned “Requested resource was not found”.

I don’t know where the problem is, please help me.

This is my polyline data:

> **[polyline.txt](https://drive.google.com/file/d/1oY8F6JRTk8QQA3vqnUVZqqWVOVu2e4da/view?usp=sharing)**
>
> Google Drive file.

 ![1](https://us1.discourse-cdn.com/flex019/uploads/nsw/original/1X/e8789510a0298474bc11c05aac0a1bd65e44f58d.png)

 ![2](https://us1.discourse-cdn.com/flex019/uploads/nsw/original/1X/3148ca6557983ddea12a6dcef306e63ec7ca7263.png)

---

<div class="post-metadata">

**Author:** ![mike\_yi](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@mike\_yi](https://opendataforum.transport.nsw.gov.au/u/mike_yi)\
**Post date:** [December 10, 2020, 3:35pm UTC](https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198/2 "2020-12-10T15:35:02Z")

</div>

Please ignore the json format error in postman, it is actually correct.

---

<div class="post-metadata">

**Author:** ![mike\_yi](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@mike\_yi](https://opendataforum.transport.nsw.gov.au/u/mike_yi)\
**Post date:** [December 10, 2020, 3:41pm UTC](https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198/3 "2020-12-10T15:41:57Z")

</div>

At present, my polyline data contains 2790 points. I thought it was caused by too many points. When I kept the total route unchanged and reduced it to 300 points, the error message Requested resource was not found was still returned.

---

<div class="post-metadata">

**Author:** ![jxeeno](https://sea1.discourse-cdn.com/flex019/user_avatar/opendataforum.transport.nsw.gov.au/jxeeno/32/210_2.png) [@jxeeno](https://opendataforum.transport.nsw.gov.au/u/jxeeno)\
**Post date:** [December 10, 2020, 10:41pm UTC](https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198/4 "2020-12-10T22:41:00Z")

</div>

Hi Mike,

~~If possible, it might be useful to share the 300 point route payload you used for reproduction 🙂~~

Nevermind, just realised you’d shared the polyline in Google Docs.

---

<div class="post-metadata">

**Author:** ![mike\_yi](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@mike\_yi](https://opendataforum.transport.nsw.gov.au/u/mike_yi)\
**Post date:** [December 10, 2020, 11:13pm UTC](https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198/5 "2020-12-10T23:13:54Z")

</div>

Hi jxeeno

Thank you for your prompt reply.

I reviewed it last night. It may be related to the precision of Polyline encode, but it is just a suspicion and cannot prove it.  
The encoding plugin I use is [google-map-polyline-encoding-tool](https://github.com/emcconville/google-map-polyline-encoding-tool)

---

<div class="post-metadata">

**Author:** ![jxeeno](https://sea1.discourse-cdn.com/flex019/user_avatar/opendataforum.transport.nsw.gov.au/jxeeno/32/210_2.png) [@jxeeno](https://opendataforum.transport.nsw.gov.au/u/jxeeno)\
**Post date:** [December 12, 2020, 11:10am UTC](https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198/6 "2020-12-12T11:10:17Z")

</div>

Hi Mike,

Did some debugging and it looks like the issue is with slight differences in underground tunnel alignments between polyline you’re passing into the API vs OpenStreetMap (which is what the toll calculator’s mapping data is based on).

You can specify manually specify a match accuracy using the `"accuracy"` parameter in the JSON payload. For your polyline, 30m seems to work ok:

```auto
{
	"polyline": "noenE}ayy...",
	"accuracy": 30
}

```

---

<div class="post-metadata">

**Author:** ![mike\_yi](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@mike\_yi](https://opendataforum.transport.nsw.gov.au/u/mike_yi)\
**Post date:** [December 12, 2020, 2:01pm UTC](https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198/7 "2020-12-12T14:01:55Z")

</div>

Thank you jxeeno,

I used the accuracy parameter, and the Toll Calculator API can work normally. Thank you so much. But I still have the following questions:

1. Toll Calculator API uses OpenStreetMap, but I use Google Map. There are certain differences between them in matching routes, which leads to the problem of inability to calculate. Is my understanding correct?

2. Does this happen only on underground tunnel routes?

3. We will also calculate Toll in other areas of Sydney. Should I always pass in the accuracy parameter?

4. The smaller the accuracy parameter value, the higher the matching degree? If it is bigger? How should I better control the value of the accuracy parameter? If possible, I would like to understand the accuracy parameter in more detail.

---

<div class="post-metadata">

**Author:** ![jxeeno](https://sea1.discourse-cdn.com/flex019/user_avatar/opendataforum.transport.nsw.gov.au/jxeeno/32/210_2.png) [@jxeeno](https://opendataforum.transport.nsw.gov.au/u/jxeeno)\
**Post date:** [December 13, 2020, 12:17am UTC](https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198/8 "2020-12-13T00:17:05Z")

</div>

> [@mike\_yi](#):
>
> Toll Calculator API uses OpenStreetMap, but I use Google Map. There are certain differences between them in matching routes, which leads to the problem of inability to calculate. Is my understanding correct?

That’s right. See below map extracts for the key differences (red = supplied polyline, blue = OSM).

> **Map extracts**
>
> ![image](https://us1.discourse-cdn.com/flex019/uploads/nsw/original/1X/f283c8372063d413c462f8aee9f9fc21c6702733.png)
> 
> ![image](https://us1.discourse-cdn.com/flex019/uploads/nsw/original/1X/cea82f71540b1e8d77d7282aac1f30a2ccabf623.png)
> 
> ![image](https://us1.discourse-cdn.com/flex019/uploads/nsw/original/1X/1de8cfc1d9cd027543eff7fb2674a9e66a40bbbb.png)

> [@mike\_yi](#):
>
> Does this happen only on underground tunnel routes?

On second examination, I suspect the issue here is actually to do with routing data in and around the business park at Botany rather than underground tunnel alignment. I’ve gone in and [fixed](https://www.openstreetmap.org/changeset/95719680#map=19/-33.94651/151.18928) some incorrect turn restrictions in OpenStreetMap and [added](https://www.openstreetmap.org/changeset/95718939) new routing inside the business park. It won’t be reflected in the Toll Calculator matching straight away, but we can see if it resolves this problem in a future map update.

> [@mike\_yi](#):
>
> The smaller the accuracy parameter value, the higher the matching degree? If it is bigger? How should I better control the value of the accuracy parameter? If possible, I would like to understand the accuracy parameter in more detail.

Think of it as the “GPS accuracy” value. The higher the value you pass in, the more lenient the matching algorithm is going to be matching against the OSM road network.

If you put in 30, it indicates to the algorithm that the coordinates you provided in the polyline are accurate to about 30 meters. It’ll try and match against all roads in a 30m radius of each point in the polyline.

> [@mike\_yi](#):
>
> We will also calculate Toll in other areas of Sydney. Should I always pass in the accuracy parameter?

I think the better strategy here might be to run `/match` _without_ the accuracy parameter first as the response is quicker. If it comes back with a “no match” error, then try again with a higher accuracy value.

---

<div class="post-metadata">

**Author:** ![mike\_yi](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@mike\_yi](https://opendataforum.transport.nsw.gov.au/u/mike_yi)\
**Post date:** [December 15, 2020, 7:41am UTC](https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198/9 "2020-12-15T07:41:23Z")

</div>

Hi jxeeno

Thank you for your detailed answer, we applied the accuracy parameter to the production environment.

Today I found that using the data in polyline.txt and adding accuracy=30, it still returns Requested resource was not found.  
Adjust the accuracy parameter to 10 20 50 100, and the returned result remains unchanged.

---

<div class="post-metadata">

**Author:** ![terencekhoo](https://avatars.discourse-cdn.com/v4/letter/t/3ec8ea/32.png) [@terencekhoo](https://opendataforum.transport.nsw.gov.au/u/terencekhoo)\
**Post date:** [December 15, 2020, 8:19am UTC](https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198/10 "2020-12-15T08:19:14Z")

</div>

Hi Mike,

We are investigating this issue and will update.

---

<div class="post-metadata">

**Author:** ![mike\_yi](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@mike\_yi](https://opendataforum.transport.nsw.gov.au/u/mike_yi)\
**Post date:** [December 15, 2020, 8:35am UTC](https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198/11 "2020-12-15T08:35:39Z")

</div>

Okay, waiting for your good news.

We also have our own development team in Sydney, if there are any changes we can participate in, please also suggest.

Thank you terencekhoo

---

<div class="post-metadata">

**Author:** ![terencekhoo](https://avatars.discourse-cdn.com/v4/letter/t/3ec8ea/32.png) [@terencekhoo](https://opendataforum.transport.nsw.gov.au/u/terencekhoo)\
**Post date:** [December 16, 2020, 2:57am UTC](https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198/12 "2020-12-16T02:57:21Z")

</div>

Hi Mike,

Please try it now. Thanks.

---

<div class="post-metadata">

**Author:** ![mike\_yi](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@mike\_yi](https://opendataforum.transport.nsw.gov.au/u/mike_yi)\
**Post date:** [December 16, 2020, 3:01am UTC](https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198/13 "2020-12-16T03:01:13Z")

</div>

API returns: “error”: “Unexpected token \_ in JSON at position 27”  
The original data is used.  
{  
“polyline”: “”,  
“vehicleClass”: “A”,  
“excludeToll”: true,  
“departureTime”: “2020-12-17T18:38:55.889”,  
“accuracy”: 30  
}

---

<div class="post-metadata">

**Author:** ![jxeeno](https://sea1.discourse-cdn.com/flex019/user_avatar/opendataforum.transport.nsw.gov.au/jxeeno/32/210_2.png) [@jxeeno](https://opendataforum.transport.nsw.gov.au/u/jxeeno)\
**Post date:** [December 16, 2020, 3:11am UTC](https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198/14 "2020-12-16T03:11:50Z")

</div>

> [@mike\_yi](#):
>
> API returns: “error”: “Unexpected token \_ in JSON at position 27”

That error message means the payload sent isn’t valid JSON (at the 27th character). Are you able to post the serialised payload? You can see an example of a working payload below.

> **Example of working payload**
>
> ```auto
> {
> "polyline": "ffenEyfyy[??GZ?@oA~GaAjFAf@@D?B?@?B?BA@A@C@A@A?AF?FAHAHCN?@R~@@HDX@PBT@T@H?H@F@F?B@HJn@L~@@BFb@BJH\\@LTbA??DRw@Ze@P}@Xq@R??e@Nc@NYHa@NQFODA?A?CACCCCAAAAAAAEEWIc@Kk@[uBSiAUiAOw@Os@IYIWKYO]S_@EGYc@OSY]a@_@MMECSO[S[OWMSGUIUGGAKCOCGAIAYC[F??uBIGAy@CIA_BGoACQ?WAoAEa@@m@???YEeAOAA?AAAA??AAA?AAAAC?CACACAE?CAC?CAE?EAE?EAE?EAE?EAW?[AcA?EEo@QiA??CMCKm@cCIUg@oBGQI]a@iBQy@EQGg@_AiDAGS_AWkAa@yBKm@Im@Iq@MmAGq@Gs@ImAEs@Cu@CeAAo@CcCBqBLwE@MBq@Bg@?I@Y@Y?W?M?W?Y?AAIAe@AYCYC_@E_@E[Ga@GWMm@UcAMm@Qu@Oq@GUGYIUIUIS_@w@GMIKOWOQOQMOQQQOQMQMy@i@i@_@gAq@s@c@kDwBQKAACAGEeC}Aa@Wc@YAASKc@Y}AaAs@e@w@e@c@Yo@a@YQc@Yg@[a@Wc@WSKQKUKOISIMGICQGOEKC]IIASEMAQCUCUAk@Ci@?k@Bi@DSBUDSDUD[HKDQFWJ_@PC@QHIFIDQLSLQNOLKHKHQRIHKLMPIHEHOP[f@U\\CFQXc@r@QXU^_@f@[`@OPQROLONQLOLSLQLQJKFIDQFSJQFQFQFQDG@QD]FMBUBUBQ@M?M@S?Q?g@AWASAk@Ea@Eq@G_AME?a@E_AKWCg@G_AKg@GiBUi@IWCeBYaAO]Gk@KsCi@aAS}@OgB[wBW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UgAMm@[{AMm@UgAI]Ke@Qo@Ss@I[_AoDQm@EKCIEMEKGKO[MSMOEEIKIIOOIEGGAAOISMKEMEIEGAKEGEg@Ic@EUC]Ee@E{@M??ST?@ABA@AB?B?BA@@B?D?BBJDRp@tAf@bAHPJXBDJZFRBLDTN|@BPBHBH??@@@?@??@@??@@??@@??@@??@@@?@@@?@?@?@?@?@?@?@?@?@?@?@A@?@A@?@EBC@A?C?A@CAC?EACCK@S?U?I?M?e@@QAe@GQCy@KqCa@}AQe@G]GIAa@GMAi@G?ASAG?E?A@C?C?EBE@??EGCCCCECCAIAkC]oC]QC[EI???OA]?_B?mAAWA]ASE?@A??@?@A@?@A?A@A?A?A?A?AAA??AAA?A?AA??A?A?AqDa@wAOw@K",
> "vehicleClass": "A",
> "excludeToll": true,
> "departureTime": "2020-12-16T03:09:01.249Z",
> "accuracy": 30
> }
> 
> ```

---

<div class="post-metadata">

**Author:** ![mike\_yi](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@mike\_yi](https://opendataforum.transport.nsw.gov.au/u/mike_yi)\
**Post date:** [December 16, 2020, 3:19am UTC](https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198/15 "2020-12-16T03:19:29Z")

</div>

I used another polyline data, sent a request, and returned successfully.

```
{
"polyline": "",
"vehicleClass": "A",
"excludeToll": true,
"departureTime": "2020-12-16T03:09:01.249Z",
"accuracy": 30
}

```

---

<div class="post-metadata">

**Author:** ![mike\_yi](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@mike\_yi](https://opendataforum.transport.nsw.gov.au/u/mike_yi)\
**Post date:** [December 16, 2020, 4:16am UTC](https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198/16 "2020-12-16T04:16:37Z")

</div>

My polyline data indicates an error, which is caused by the backslash "". It is correct to replace it with “\”.

---

<div class="post-metadata">

**Author:** ![mike\_yi](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@mike\_yi](https://opendataforum.transport.nsw.gov.au/u/mike_yi)\
**Post date:** [December 16, 2020, 4:42am UTC](https://opendataforum.transport.nsw.gov.au/t/requested-resource-was-not-found-error-message/2198/17 "2020-12-16T04:42:28Z")

</div>

Hi jxeeno and terencekhoo

We checked the production environment log and everything seems to be normal now.  
Thank you very much 😁

Regards,  
Mike
