Verified Commit de379fc6 authored by Michael Auer's avatar Michael Auer
Browse files

workaround for unstable handling of input geometries by Ohsome API

parent ce82899c
...@@ -255,7 +255,14 @@ class Ohsome2X extends EventEmitter { ...@@ -255,7 +255,14 @@ class Ohsome2X extends EventEmitter {
let axiosError: AxiosError = e; let axiosError: AxiosError = e;
delete axiosError.config.data; //avoid logging bpoly data delete axiosError.config.data; //avoid logging bpoly data
if (axiosError.response) { if (axiosError.response) {
if (axiosError.response.status == 413) { if (axiosError.response.status == 413
//workaround for topology exceptions issue in ohsomeAPI
//error happens here: https://github.com/GIScience/ohsome-api/blob/master/src/main/lombok/org/heigit/ohsome/ohsomeapi/inputprocessing/GeometryBuilder.java#L307
//see also: https://github.com/GIScience/oshdb/issues/351
|| (axiosError.response.status == 500
//other messages also occur && axiosError.response.data.message.includes('non-noded intersection')
)
) {
//try reducing fetch size as long as possible before failing //try reducing fetch size as long as possible before failing
//check if minimum fetch size alredy reached //check if minimum fetch size alredy reached
if (fetchSize <= 1) { if (fetchSize <= 1) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment