Skip to content

Instantly share code, notes, and snippets.

@mb8z
Created December 22, 2021 12:11
Show Gist options
  • Save mb8z/90befb92bc5cba677220147b6851e414 to your computer and use it in GitHub Desktop.
Save mb8z/90befb92bc5cba677220147b6851e414 to your computer and use it in GitHub Desktop.
Alerts
const exampleAlerts = [
{
code: 'invalid-api-key',
message: 'Your Mailgun API key is invalid',
level: 'error',
resolved: false,
app: 'my-app',
app_environment: 'staging',
service_slug: 'email',
service_provider: 'mailgun',
action: 'Update API key',
url: 'https://app.automagically.com/apps/my-app/services/email/settings',
},
{
code: 'sendgrid:system-failure',
message: 'Sendgrid failure',
level: 'system', // This level can't be resolved by the user
resolved: false,
app: 'my-app',
app_environment: 'staging',
service_slug: 'email',
service_provider: 'sendgrid',
action: null,
url: null,
},
{
code: 'credit-card-expired',
message: 'Your credit card has expired',
level: 'warning',
resolved: false,
app: 'my-app',
app_environment: 'staging',
service_slug: null,
service_provider: null,
action: 'Update billing',
url: 'https://app.automagically.com/apps/my-app/billing',
},
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment