goutamadwant commented on code in PR #12619: URL: https://github.com/apache/seatunnel/pull/12619#discussion_r4267192432
########## seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/lineage/JobLineageException.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.apache.seatunnel.engine.server.rest.lineage; + +import lombok.Getter; + +/** + * Raised when a job DAG snapshot cannot be projected into a lineage graph. The message is fixed per + * reason and never contains topology names, table paths or configuration values. + * + * <p>These are expected outcomes, not server faults: the lineage endpoint maps {@link + * Reason#LINEAGE_UNAVAILABLE} to 409 and {@link Reason#LINEAGE_GRAPH_TOO_LARGE} to 413 itself + * (STIP-39, #12268) and must not let this exception reach the generic REST exception filter. + */ +@Getter +public class JobLineageException extends RuntimeException { Review Comment: @nzw921rx I kept `JobLineageException` local to the projector because its reasons need different HTTP responses: unavailable snapshot -> 409; oversized graph -> 413. Extending `SeaTunnelRuntimeException` alone would still produce a generic 500 if uncaught. The endpoint slice will map and test both reasons explicitly. so would you prefer lineage-specific SeaTunnel error codes as well or this good ? -- 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]
