Threat Stack Blog and Cloud Security News

Continuous security monitoring for your cloud.

Python Flask Exception Handling In A Secure Manner

by Tom McLaughlin , posted in Cloud Security, Exception Handling, Python, Flask, Python Flask Exception Handling

Python Flask Blog Banner2-1.png

In our last Python Flask blog post, we walked through building a simple application to take in a Threat Stack webhook and archive the alert to AWS S3. In this post, we’ll dive into Python exception handling and how to do it in a secure manner.

The code in the last post was written to be as simple and readable as possible. However, what happens if something goes wrong in our application? There’s no error or exception handling. If something goes wrong — for example, we hit a bug or receive bad data — there’s nothing we can do about it in the application. Instead of returning a parseable JSON response, the app will just spit a backtrace embedded in an HTML document back. The entity sending the request to our service is then left trying to figure out what may have gone wrong.

Read More [fa icon=long-arrow-right"]

Feb 9, 2017 2:02:31 PM

[fa icon="comment"] 0 Comments

Scala @ Scale, Part 1: Leaving Unhandled Errors Behind

by Dave Hagman , posted in Error Handling, Scala at Scale, Exception Handling, Scala, Functional Programming


The number of organizations investing in Scala is exploding, and for good reason. Scala combines Object Oriented and Functional capabilities as well as immutability, which makes it an extremely powerful foundation for applications that need to run at massive scale.

This series on Scala aims to bridge the gap between theory and practice by focusing on something that is not easily found on the open internet: Actual examples of functional concepts being used in production, at scale. We’ll even give you code samples!

Part 1 of the series dives into something that’s near and dear to all of us: How to incorporate error handling as a primary concern with a minimal level of effort.

Read More [fa icon=long-arrow-right"]

Jul 5, 2016 4:17:12 PM

[fa icon="comment"] 0 Comments

Subscribe via email:

Posts by Topic

see all