doddi commented on code in PR #576: URL: https://github.com/apache/maven-resolver/pull/576#discussion_r1756126576
########## maven-resolver-spi/src/main/java/org/eclipse/aether/spi/connector/transport/http/RFC9457/HttpRFC9457Exception.java: ########## @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.eclipse.aether.spi.connector.transport.http.RFC9457; + +import java.io.IOException; + +import org.eclipse.aether.spi.connector.transport.http.HttpTransporter; + +/** + * Exception thrown by {@link HttpTransporter} in case of errors. + * + * @since 2.0.2 + */ +public class HttpRFC9457Exception extends IOException { + private final int statusCode; + + private final String reasonPhrase; + + private final RFC9457Payload rfc9457; + + public HttpRFC9457Exception(int statusCode, String reasonPhrase, RFC9457Payload rfc9457) { + super(rfc9457.toString()); + this.statusCode = statusCode; + this.reasonPhrase = reasonPhrase; + this.rfc9457 = rfc9457; + } + + public int getStatusCode() { + return statusCode; + } + + public String getReasonPhrase() { + return reasonPhrase; + } + + public RFC9457Payload getRFC9457() { Review Comment: https://github.com/apache/maven-resolver/pull/576/commits/cf8c50400278152660aecd61fc6e57430bca4fc6 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
