(edit) adding in error handling from transfer
(edit) rewrites res to send status and message