if catch exception, then return 500