Company
Date Published
Author
Jose Oliveros
Word count
1063
Language
English
Hacker News points
None

Summary

The Spark Java application demonstrates how to send SMS alerts when a server error occurs. The application first reads administrators' phone numbers from a JSON file using the Gson library, then configures the Twilio REST Client to send messages with the phone number of each administrator and a custom message. The application handles exceptions by mapping them to a configured type for all routes and filters, sending alerts to administrators when an exception occurs. A custom alert message is created to include a picture or screenshot, and the application logs requests and responses using a logging filter.