Fixed exception handling.

The status code needed to be converted to a string before being printed.