[RTFACT-8257] Inconsistent behaviour when cancelling a Nuget resolution with afterRemoteDownload Created: 27/Sep/15  Updated: 14/Nov/17  Resolved: 13/Jul/16

Status: Resolved
Project: Artifactory Binary Repository
Component/s: NuGet, Plugins
Affects Version/s: 4.1.2
Fix Version/s: 4.10.0

Type: Bug Priority: Normal
Reporter: Uriah Levy Assignee: Shay Bagants
Resolution: Fixed Votes: 0
Labels: None

Attachments: Text File stacktrace.txt    
Assigned QA: Gal Raif


Throwing a cancelException to cancel a resolution of a nuget package, causes an internal server error which is propagated to the client.

E.g -


afterRemoteDownload { Request request, RepoPath repoPath ->
            throw new org.artifactory.exception.CancelException("Request has been added", 421);

Will return a 500 rather than a 421 to the Nuget client upon a 'nuget install'.
This is inconsistent with "regular" downloads, where the cancelException response is propagated properly to the client.

Stack trace attached.

Generated at Mon Aug 26 11:09:01 UTC 2019 using JIRA 7.6.3#76005-sha1:8a4e38d34af948780dbf52044e7aafb13a7cae58.