interesting details IMHO, we're back to the HTTP wire protocol between Maven CLI and repositories not being precisely defined on edge cases = what to put as HTTP return code, what to put as reason phrase (deprecated in HTTP/1.1, removed in HTTP/2), and what to get from HTTP body
idea has been shared some time ago about using RFC 7807, but nothing has been really done see https://issues.apache.org/jira/browse/MNG-6795 , marked as candidate for Maven 4, but did not get much traction for now Regards, Hervé Le vendredi 5 janvier 2024, 19:11:57 CET Romain Manni-Bucau a écrit : > Hi, > > This is a valid error but if you want to see it you need to enable HTTP > frames. > > For the record the error returns a HTML response with this content: > *<p>Cannot find a matching staging profile</p>*. > > If you want to check them out it depends a bit of your maven version but > for 3.9 you just comment the two last lines > of $MAVEN_HOME/conf/logging/simplelogger.properties > (org.slf4j.simpleLogger.log.org.apache.http) and run in debug mode (for > maven 4 you can use the JVM httpclient system properties IIRC). > > But agree our client could be more precise on the error instead of just > throwing a 400 without any message, if you feel motivated to send a pr it > would be welcomed I guess. > > Romain Manni-Bucau > @rmannibucau <https://twitter.com/rmannibucau> | Blog > <https://rmannibucau.metawerx.net/> | Old Blog > <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> > | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book > <https://www.packtpub.com/application-development/java-ee-8-high-performance > > > Le ven. 5 janv. 2024 à 18:46, Michael Osipov <[email protected]> a écrit : > > On 2024/01/04 14:00:08 tison wrote: > > > Hi, > > > > > > When deploying artifacts to Nexus repository, 400 Bad Request can be > > > one of the most confusing error code. See [1] as an example. > > > > > > Sonatype has a page to document some common causes of 400 Bad Request > > > [2]. But I wonder if we can return an error message (diagnostic) along > > > with the error code, so that users can get what conditions broken > > > exactly. > > > > > > I suppose it has been discussed before. Is there any reference about > > > this? What is the related components / code I can check for potential > > > contributions (fixes)? > > > > > > Best, > > > tison. > > > > > > [1] https://issues.apache.org/jira/browse/INFRA-25344 > > > [2] https://central.sonatype.org/faq/400-error/ > > > > Looking at the INFRA issue it seems that 400 is just wrong. There is not > > client issue here, but a permission issue which should give you 403. Maybe > > that is a bug in Nexus itself. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
