From: Felix Dörre Date: Sun, 12 Jun 2016 14:46:03 +0000 (+0200) Subject: fix: more descriptive error message X-Git-Url: https://code.wpia.club/?p=gigi.git;a=commitdiff_plain;h=bb61cf9360044b8f75d210a52ca628fde72387e8 fix: more descriptive error message Change-Id: I4a77d3c98fb8ee4c31f644a3e88b0104e61fff0d --- diff --git a/src/org/cacert/gigi/api/CATSResolve.java b/src/org/cacert/gigi/api/CATSResolve.java index 5da53940..1b25e9d5 100644 --- a/src/org/cacert/gigi/api/CATSResolve.java +++ b/src/org/cacert/gigi/api/CATSResolve.java @@ -22,9 +22,12 @@ public class CATSResolve extends APIPoint { if ( !((Organisation) u).isSelfOrganisation()) { resp.sendError(500, "Error, invalid cert"); return; - } String target = req.getParameter("serial"); + if (target == null) { + resp.sendError(500, "Error, requires a serial parameter"); + return; + } CertificateOwner o = CertificateOwner.getByEnabledSerial(target); if ( !(o instanceof User)) {