WMS Hotfix 4.0.0.540 was released 1-19 for on-premises to address this.    Can you verify that this has resolved your issue? [URL]
Hello Community,  I'm unable to deploy/push images to our WES devices after the upgrade of our On-Premise WMS to the 4.0 version.  I' get the following error: "Internal error. Exception is handled" Is this issue related to the patch that will be released soon? 
Unable to deploy images after upgrade to 4.0