[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    


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 Wed Aug 05 23:04:46 UTC 2020 using Jira 8.5.3#805003-sha1:b4933e02eaff29a49114274fe59e1f99d9d963d7.