singhpk234 commented on code in PR #16507: URL: https://github.com/apache/iceberg/pull/16507#discussion_r3929625410
########## api/src/main/java/org/apache/iceberg/exceptions/OAuth2BadRequestException.java: ########## @@ -0,0 +1,42 @@ +/* + * 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.apache.iceberg.exceptions; + +import com.google.errorprone.annotations.FormatMethod; +import com.google.errorprone.annotations.FormatString; + +/** + * Bad-request exception raised when an OAuth2 token-endpoint response carries one of the {@code + * 400}-class error codes from RFC 6749 ยง5.2 (e.g. {@code invalid_request}, {@code invalid_grant}, + * {@code unauthorized_client}, {@code unsupported_grant_type}, {@code invalid_scope}). + */ +public class OAuth2BadRequestException extends BadRequestException implements OAuth2Error { Review Comment: while i understand this would be ideal, there is no such exception defined in the spec https://github.com/apache/iceberg/blob/6dec25e430b33a8b4f623b14940110d459581826/open-api/rest-catalog-open-api.yaml#L4804 would like to hear from others on what they think considering that -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
