placeholder
placeholder copied to clipboard
Internal Server Error when geocoding addresses containing `constructor`
Describe the bug
When geocoding text that contains the word constructor, Pelias throws a http status 500, Internal Server Error.
Steps to Reproduce
- Start the Pelias Placeholder server
- GET
/parser/search?text=constructor
Pelias returns an error described below.
Expected behavior Pelias does not have an internal server error.
Environment
- OS: Amazon Linux 2.
- Docker version:
Docker version 20.10.23, build 7155243 - Pelias Placeholder Version: v3.15.0
Pelias Error
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>TypeError: Cannot read property 'length' of undefined<br> at _isArrayRangeIsEqual (/code/pelias/placeholder/prototype/tokenize.js:68:32)<br> at _groups (/code/pelias/placeholder/prototype/tokenize.js:113:12)<br> at /code/pelias/placeholder/prototype/tokenize.js:34:22<br> at /code/pelias/placeholder/node_modules/async/dist/async.js:2960:13<br> at wrapper (/code/pelias/placeholder/node_modules/async/dist/async.js:271:20)<br> at replenish (/code/pelias/placeholder/node_modules/async/dist/async.js:441:29)<br> at /code/pelias/placeholder/node_modules/async/dist/async.js:451:13<br> at eachOfLimit$1 (/code/pelias/placeholder/node_modules/async/dist/async.js:477:34)<br> at awaitable (/code/pelias/placeholder/node_modules/async/dist/async.js:211:32)<br> at eachOfSeries (/code/pelias/placeholder/node_modules/async/dist/async.js:813:16)</pre>
</body>
</html>
Thanks for the report, this is very odd.