gnodet-bot commented on code in PR #30237: URL: https://github.com/apache/camel/pull/30237#discussion_r4591684205
########## docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc: ########## @@ -476,6 +476,21 @@ starting directory (`autoCreate=true`), it now logs `Cannot auto-create starting directory <directory> at: ... due to: ... Will skip this poll.` instead. See the xref:components::sftp-component.adoc[SFTP component]. +=== camel-smb - a starting directory that cannot be created + +When the server refuses to create the starting directory of the `smb` consumer as the route starts (`autoCreate=true`), +such as `STATUS_ACCESS_DENIED` on a read-only share, the route now starts and the consumer tries again on each poll, as +the xref:camel-4x-upgrade-guide-4_13.adoc#_camel_file_camel_ftp_camel_smb_camel_azure_files[Camel 4.13 upgrade guide] +describes. Before, the route failed to start. `SmbOperations.buildDirectory` now throws a +`GenericFileOperationFailedException` with the smbj exception as its cause, as the ftp and sftp operations do. This +also applies when the producer or a move creates a directory. + Review Comment: 💬 **Doc nit (low):** The sentence "This also applies when the producer or a move creates a directory" is technically accurate about the exception type change, but in context — following the description of the consumer's graceful-start behaviour — it reads as if the producer also starts gracefully when the directory cannot be created. It doesn't: `GenericFileProducer.writeFile()` does not catch the exception from `buildDirectory`, so it propagates as a message processing failure. Consider clarifying the scope: ```suggestion `GenericFileOperationFailedException` with the smbj exception as its cause, as the ftp and sftp operations do. This also applies when the producer or a move creates a directory: any code catching `GenericFileOperationFailedException` from `buildDirectory` now also catches the smbj exception. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
