http thread: support JSON body with 500 response