From 2c463fcdab78412f65459f37398a185b1ee6a311 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 9 Oct 2020 19:27:04 +0100 Subject: [PATCH] Guard against derivation IDs that aren't numbers I saw an error suggesting that something came back that wasn't a number, and this should give a more informative error. --- guix-data-service/data-deletion.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/guix-data-service/data-deletion.scm b/guix-data-service/data-deletion.scm index 7674535..1d8a22c 100644 --- a/guix-data-service/data-deletion.scm +++ b/guix-data-service/data-deletion.scm @@ -493,6 +493,11 @@ WHERE NOT EXISTS ( 0 (map (lambda (derivation-id) + (unless (string->number derivation-id) + (error + (simple-format #f "derivation-id: ~A is not a number" + derivation-id))) + (with-thread-postgresql-connection (lambda (conn) (with-postgresql-transaction