These examples demonstrate how to process different communication channels. Each handler receives settings which are pre-filled based on the App Settings you defined in the Partner Portal.
OTP messages require high reliability and low latency. It is recommended to use shorter timeouts (e.g., 5 seconds) to fail fast and allow Salla to potentially retry or fall back.
When your App Function returns a Resp.error(), Salla logs the status code and message. Use the table below to identify and fix common implementation hurdles.
Status Code
Error Message
Common Cause
Recommended Fix
422
Missing settings...
The merchant hasn't filled in the required API keys in the app settings.
Check if the merchant has completed the app setup in the Salla Dashboard.
503
Provider timed out
The third-party SMS/Email API took longer than your AbortSignal.timeout.
Increase the timeout slightly (max 20s) or check the provider's status page.
401/403
Unauthorized
The API key provided in settings is invalid or expired.
Ensure the merchant is using a valid, active API key from their provider.
429
Too Many Requests
You've hit the rate limit of your SMS or Email provider.
Implement retry logic or check provider throughput limits.
500
Internal Server Error
Unhandled exception in your code (e.g., null pointer on entity).
Verify safe access to optional fields like meta or entity.
Pro Tip: Testing Payloads
Before going live, Test Feature in the Partner Portal to send dummy payloads to your function. This ensures your mapping logic for notifiable and content is solid across different event types.