pinpoint-apm/pinpoint · warning · ResponseStatusException
Missing argument: webhook.id
Error message
Missing argument: webhook.id
What it means
Pinpoint Web's WebhookController.deleteWebhook requires the request body JSON to carry a non-empty webhookId. Because @RequestBody deserializes into a Webhook POJO, a missing or empty 'webhookId' field passes controller binding and is only caught by this explicit StringUtils.hasText check, which then throws a Spring ResponseStatusException mapped to HTTP 400.
Source
Thrown at webhook/src/main/java/com/navercorp/pinpoint/web/webhook/controller/WebhookController.java:68
}
try {
validateURL(webhook);
} catch (IllegalArgumentException e) {
logger.info("Invalid argument: webhook.url");
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Invalid argument: webhook.url");
}
String webhookId = webhookService.insertWebhook(webhook);
return new WebhookResponse(Result.SUCCESS, webhookId);
}
@DeleteMapping()
public Response deleteWebhook(@RequestBody Webhook webhook) {
if (!StringUtils.hasText(webhook.getWebhookId())) {
logger.info("Missing argument: webhookId");
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Missing argument: webhook.id");
}
webhookService.deleteWebhook(webhook);
return SimpleResponse.ok();
}
@GetMapping()
public List<Webhook> getWebhook(@RequestParam(value=APPLICATION_ID, required=false) String applicationName,
@RequestParam(value=SERVICE_NAME, required=false) String serviceName,
@RequestParam(value=ALARM_RULE_ID, required=false) String ruleId) {
if (!StringUtils.hasText(applicationName) && !StringUtils.hasText(serviceName) && !StringUtils.hasText(ruleId)) {
logger.info("Missing argument: applicationId/serviceName/ruleId");
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Missing argument: applicationId / serviceName / ruleId");
}
if (StringUtils.hasText(ruleId)) {
return webhookService.selectWebhookByRuleId(ruleId);
}View on GitHub (pinned to 744c3d3075)
Solutions
- Include a non-empty webhookId string field in the DELETE request body, e.g. {"webhookId":"<existing-id>"}
- Verify the field name and casing exactly matches webhookId as defined in the Webhook DTO
- Fetch the webhook id first via GET /webhook?applicationId=... or ?ruleId=... if unknown
- Ensure the HTTP client actually serializes the body (Content-Type: application/json, non-empty payload)
Example fix
// before
curl -X DELETE http://pinpoint/webhook -H 'Content-Type: application/json' -d '{}'
// after
curl -X DELETE http://pinpoint/webhook -H 'Content-Type: application/json' -d '{"webhookId":"e2f1a3b4c5d6"}' Defensive patterns
Strategy: validation
Validate before calling
if (webhook == null || webhook.getWebhookId() == null || webhook.getWebhookId().isBlank()) { throw new IllegalArgumentException("webhookId is required to delete a webhook"); } Type guard
boolean isDeletable(Webhook w) { return w != null && w.getWebhookId() != null && !w.getWebhookId().isBlank(); } Try / catch
try { webhookService.deleteWebhook(webhook); } catch (HttpStatusCodeException e) { if (e.getStatusCode() == HttpStatus.BAD_REQUEST) { /* inspect webhookId field */ } throw e; } Prevention
- Always source webhookId from a prior GET /webhook lookup, never hardcode
- Log the exact request body before sending so missing fields are visible
- Use a typed client/DTO mirroring the Webhook fields instead of hand-built JSON
- Add a client-side hasText check on webhookId before any webhook write/delete call
When it happens
Trigger: Calling DELETE /webhook with a JSON body like {} or {"webhookId":""} or a body omitting the webhookId field entirely; also happens when the client sends a differently-cased key (e.g. webhook_id) that Jackson leaves null on the Webhook object.
Common situations: Scripts deleting webhooks from a saved export that lacks the id field; clients built against an older API where the id was passed as a query parameter; automation sending null ids after a failed lookup of the webhook to delete.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Missing arguments: webhook.id, webhook.url, applicationId/se
- there should be ruleId and webhookId to insert webhookSendIn
- No service type provided.
- User information validation failed to creating user informat
- Invalid serviceTypeCode
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/eacb3322c30ded44.
Report an issue: GitHub.