For some reason, my answer was caught as spam.
So you can read it at https://stackoverflow.com/questions/50355471/appydynamic-reports-error-for-filenotfoundexception instead.
^ Post edited by @Ryan.Paredez, Christopher's original reply that was f...
Are you sure you're not getting the FileNotFound when trying to do getInputStream on the connection later (or in your real code in case this is a simplified example)? Since HttpUrlConnection implements http protocol and 4xx codes are error codes tryi...