[minor] proper error handling and 500 display