Skip to content

Commit

Permalink
Fix error handling in feature_writer.sql
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Rögner <[email protected]>
  • Loading branch information
roegi committed Sep 26, 2024
1 parent f40a608 commit a9c4ffb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xyz-util/src/main/resources/sql/feature_writer.sql
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ $BODY$
return return_result ? result : {"count": result.features.length};
}
catch (error) {
throw new Error("Unexpected error in feature_writer: " + error.message);
if (!error.code)
throw new Error("Unexpected error in feature_writer: " + error.message);
else
throw error;
}
$BODY$ LANGUAGE plv8 IMMUTABLE;

Expand Down

0 comments on commit a9c4ffb

Please sign in to comment.