reuse status(500) on error and check it via ajax error