fix wrong function call in resthandler, make sure the statuscode wont get lost and catch midcom_errors only (let the error handler do the rest)