From 690369f23acd3f7de83cff6d1ae5893b75505e77 Mon Sep 17 00:00:00 2001 From: Saoirse Aronson Date: Thu, 22 Oct 2026 17:12:37 +0200 Subject: [PATCH] Stop swalloing errors in Rule.apply If expressions throw an error or evaluate to a non-boolean value, currently Rule.apply just swallows the error. Instead the error should be bubbled up through the stream. --- .../src/main/java/org/eclipse/biscuit/datalog/Rule.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/biscuit-core/src/main/java/org/eclipse/biscuit/datalog/Rule.java b/biscuit-core/src/main/java/org/eclipse/biscuit/datalog/Rule.java index e7457720..6aa3d584 100644 --- a/biscuit-core/src/main/java/org/eclipse/biscuit/datalog/Rule.java +++ b/biscuit-core/src/main/java/org/eclipse/biscuit/datalog/Rule.java @@ -72,10 +72,10 @@ public Stream, Error>> apply( } // continue evaluating if true } else { - return Stream.empty(); + return Stream.of(Result.err(new Error.InvalidType())); } } catch (Error error) { - return Stream.empty(); + return Stream.of(Result.err(error)); } }