Skip to content

Conversation

@github-actions
Copy link
Contributor

Problem

The appointment-service-get Lambda function was experiencing critical availability issues with 475 NullPointerException errors in the last 4+ hours, causing:

  • High error rate (~2 errors/minute)
  • API Gateway latency degradation (677ms p99 for /list, 282ms for /get)
  • Cascade effects on downstream services

Root Cause

Intentional error injection in lambda-petclinic/sample-apps/function3-different-version/lambda_function.py at line 27:

if pet_id == "111111111111":
    raise Exception('Fail to parse the request. Cause: NullPointerException')

This was triggered by the HttpRequesterFunction (function4) running every minute via EventBridge, which generates malicious requests by replacing petid=dog with petid=111111111111.

Solution

  • ✅ Removed the intentional exception throwing logic
  • ✅ Maintains proper error handling for missing parameters
  • ✅ Preserves all other functionality and validation

Impact

This fix will:

  • Eliminate the 475+ recurring exceptions
  • Reduce API Gateway latency back to normal levels
  • Stop the cascade effect on downstream services
  • Maintain proper Application Signals observability without artificial errors

Testing

The fix removes only the problematic error injection while preserving:

  • Parameter validation for owners and pet_id
  • Proper error responses for missing recordId
  • DynamoDB error handling
  • OpenTelemetry tracing functionality

Resolves the critical availability issues identified in the Application Signals investigation.

- Removed intentional exception for petid=111111111111 that was causing 475 errors
- This resolves the critical availability issues in appointment-service-get
- Error was triggered by HttpRequesterFunction generating malicious requests every minute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants