catch internal server error
finally