srt: Clean up error handling