Anishek | #2059 | changed the map function to handle error/success sbumissions correctly