[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

 Description   

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

E.g -

download{

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 Wed Nov 20 00:01:51 UTC 2019 using JIRA 7.6.16#76018-sha1:9ed376192612a49536ac834c64177a0fed6290f5.