So I have run across an interesting issue and I am hoping someone might have run across this before or might have some advice for me.
For a project, with each item we get in, we upload an image of a document to an FTP site. At this point in time, it does successfully upload, however every now and then, what I want to call an "imaginary exception" comes up.
My controller action related to this issue is as such:
try{
Storage::disk('rrtsdrs-ftp')->put($proN, $file);
}
catch (\Exception $e) {
$errorMessage = $e->getMessage();
Mail::send('emails.response.agentRemitErrors', ['item' => $item], function($message) use ($item){
$message->from('*********', '***********');
$message->subject('DR Remit Exceptions - '. $item->pro_number);
$message->to('*****************');
});
}
I put in this solely to notify me if something goes wonky and I need to reupload an image. However, whenever an exception notifies me, I learn that the image has in fact been successfully uploaded without an issue.
So I'm wondering if there is something else it could be. I'd appreciate any help anyone can provide.
Thanks!