The remote server returned an error: (400) Bad Request - Package already Published

Is there a way to check if the package already exists and if so don’t push the same version? - some flag on octopack?

Having to go in and remove packages each time isn’t great.

Hi Gregor,

No, there’s no way to do this. Could you change your build process somehow so that you either always push the packages during a build and base the package version on the build number (so that you never push the same package twice)?

Paul

We use the revision number from Subversion so sadly not, is there any way to check if a package already exists within the api or otherwise?

Hi Gregor,

Yes, you can hit the API at:

/api/packages/packages-OctoFX.Database-2.9.3282

So /api/packages/packages-{id}-{version}. It will 404 if not found.

Paul

Hi Paul

Thanks for that - I wont implement that just yet but good to know I can do that if people start complaining to me about our builds.

Cheers
Gregor