While running sync/diff, if a plugin references a foreign entity that doesn’t exist, the request goes through without being caught by decK. As a result, the call reaches the gateway, which then returns below error.
Error: 1 errors occurred:
while processing event: Create plugin rate-limiting for service example-service and consumer shivay failed: HTTP status 400 (message: "schema violation (consumer.id: expected a valid UUID)")
This error can be misleading, because the root cause is that the referenced entity is missing, but decK does not validate or catch this earlier in the flow.
Ideally, in such cases, decK should fail early and return a clear error indicating that the referenced entity was not found, instead of letting the request reach the gateway and surface a misleading error.
Steps to reproduce :
I am running below file, but the consumer is not defined not in the state file neither globally.
_format_version: "3.0"
services:
- name: example-service
port: 3200
protocol: http
host: localhost
plugins:
- config:
limit_by: consumer
minute: 6
policy: local
consumer: alice
enabled: true
name: rate-limiting
protocols:
- http
Error:
Error: 1 errors occurred:
while processing event: Create plugin rate-limiting for service example-service and consumer shivay failed: HTTP status 400 (message: "schema violation (consumer.id: expected a valid UUID)")
While running sync/diff, if a plugin references a foreign entity that doesn’t exist, the request goes through without being caught by decK. As a result, the call reaches the gateway, which then returns below error.
This error can be misleading, because the root cause is that the referenced entity is missing, but decK does not validate or catch this earlier in the flow.
Ideally, in such cases, decK should fail early and return a clear error indicating that the referenced entity was not found, instead of letting the request reach the gateway and surface a misleading error.
Steps to reproduce :
I am running below file, but the consumer is not defined not in the state file neither globally.
Error: