pinpoint-apm/pinpoint · error · ResponseStatusException
There should be webhookSendInfoId, webhookId and ruleId to u
Error message
There should be webhookSendInfoId, webhookId and ruleId to update webhook send information
What it means
The PUT endpoint for updating webhook send information requires the request body to contain non-empty webhookSendInfoId, webhookId, and ruleId. If any of the three is missing or blank, the controller throws a 400 BAD_REQUEST ResponseStatusException and skips the update. All three fields are needed to identify the record and its webhook/rule associations.
Source
Thrown at webhook/src/main/java/com/navercorp/pinpoint/web/webhook/controller/WebhookSendInfoController.java:77
@GetMapping()
public List<WebhookSendInfo> getWebhookSendInfo(@RequestParam(value=WEBHOOK_ID, required=false) String webhookId,
@RequestParam(value=RULE_ID, required=false) String ruleId) {
if (!StringUtils.hasText(webhookId) && !StringUtils.hasText(ruleId)) {
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Either webhookId or ruleId is needed to get webhook send information");
}
if (StringUtils.hasText(webhookId)) {
return webhookSendInfoService.selectWebhookSendInfoByWebhookId(webhookId);
}
return webhookSendInfoService.selectWebhookSendInfoByRuleId(ruleId);
}
@PutMapping()
public Response updateWebhookSendInfo(@RequestBody WebhookSendInfo webhookSendInfo) {
if (!StringUtils.hasText(webhookSendInfo.getWebhookSendInfoId()) ||
!StringUtils.hasText(webhookSendInfo.getWebhookId()) || !StringUtils.hasText(webhookSendInfo.getRuleId())) {
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "There should be webhookSendInfoId, webhookId and ruleId to update webhook send information");
}
webhookSendInfoService.updateWebhookSendInfo(webhookSendInfo);
return SimpleResponse.ok();
}
}
View on GitHub (pinned to 744c3d3075)
Solutions
- Load the existing WebhookSendInfo via GET first and send the complete object with all three fields populated.
- Ensure webhookSendInfoId, webhookId, and ruleId are all set on the request body before the PUT.
- Client-side: validate all three fields are non-empty strings before calling the update API.
- Check JSON field names match the WebhookSendInfo Java properties exactly.
Example fix
// before
updateWebhookSendInfo({ webhookSendInfoId: id, webhookId: wid }); // ruleId missing
// after
updateWebhookSendInfo({ webhookSendInfoId: id, webhookId: wid, ruleId: sendInfo.ruleId }); Defensive patterns
Strategy: validation
Validate before calling
const canUpdate = (info) =>
[info?.webhookSendInfoId, info?.webhookId, info?.ruleId].every((v) => typeof v === 'string' && v.trim() !== '');
if (!canUpdate(webhookSendInfo)) {
throw new Error('webhookSendInfoId, webhookId and ruleId are all required to update');
} Type guard
const isUpdatableSendInfo = (v: unknown): v is { webhookSendInfoId: string; webhookId: string; ruleId: string } =>
typeof v === 'object' && v !== null &&
['webhookSendInfoId', 'webhookId', 'ruleId'].every((k) => typeof (v as any)[k] === 'string' && (v as any)[k].trim() !== ''); Try / catch
try {
await updateWebhookSendInfo(info);
} catch (e) {
if (e?.status === 400 && /webhookSendInfoId, webhookId and ruleId/.test(e.message)) {
showError('Update failed: reload the record and ensure all fields are present.');
} else throw e;
} Prevention
- Fetch the record via GET, mutate it, and PUT the full object rather than a partial patch.
- Never send client-constructed objects to update endpoints; only mutate server-fetched records.
- Add a form-level check that all three fields are non-empty before submitting.
- Keep frontend TypeScript types mirroring the WebhookSendInfo DTO so missing fields fail at compile time.
When it happens
Trigger: Sending PUT with a WebhookSendInfo body where webhookSendInfoId, webhookId, or ruleId is null, absent, an empty string, or whitespace.
Common situations: Clients send a partially-loaded object (only the fields the user edited); the object was created client-side for a new row and lacks a server-generated webhookSendInfoId; field-name casing mismatches make one property silently undefined after deserialization.
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
- there should be webhookSendInfoId to delete webhook
- Missing argument: webhook.id
- Missing arguments: webhook.id, webhook.url, applicationId/se
- there should be ruleId and webhookId to insert webhookSendIn
- Either webhookId or ruleId is needed to get webhook send inf
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/ec52cbb402de8da4.
Report an issue: GitHub.