guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: Add another guard clause in to the data deletion code


From: Christopher Baines
Subject: 01/02: Add another guard clause in to the data deletion code
Date: Sat, 10 Oct 2020 08:49:17 -0400 (EDT)

cbaines pushed a commit to branch master
in repository data-service.

commit f02c245652b6d3dc2d4bbde38044610620332fd5
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Sat Oct 10 13:34:54 2020 +0100

    Add another guard clause in to the data deletion code
    
    I've see this error [1] which may relate to the derivation-output-details-id
    not being a number, so this check should confirm if there is a issue.
    
    1: Throw to key `psql-query-error' with args `(fatal-error 
"PGRES_FATAL_ERROR" "ERROR:  invalid input syntax for integer: \"\"\n")'.
---
 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 1d8a22c..347ffcf 100644
--- a/guix-data-service/data-deletion.scm
+++ b/guix-data-service/data-deletion.scm
@@ -381,6 +381,11 @@ RETURNING derivation_outputs.derivation_output_details_id"
 
        (for-each
         (lambda (derivation-output-details-id)
+          (unless (string->number derivation-output-details-id)
+            (error
+             (simple-format #f "derivation-output-details-id: ~A is not a 
number"
+                            derivation-output-details-id)))
+
           (match (exec-query
                   conn
                   "



reply via email to

[Prev in Thread] Current Thread [Next in Thread]