I have written a small function that first takes an image, calculates mean for each of its bands and then converts the dictionary of the mean value to an image with each mean value acting as a new band to the image.
When I applied this function to one image, it worked. However, when I mapped this function to an image collection, it shows an error.
I didn't quite understand what the error mean. Also, I think the function is actually being executed in the image collection as well because when I print the results, I don't get any error. The error occurs when I try to add the result as a layer.
The link to the code is below: https://code.earthengine.google.com/3b0279b87c668347dccae455b4e42974