also why are you returning 500 on error?