forked from OpenLineage/OpenLineage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add info from http response to client exception (OpenLineage#2486)
Signed-off-by: David Goss <david.goss@matillion.com> Signed-off-by: Fabio Manganiello <fabio@manganiello.tech>
- Loading branch information
1 parent
44553a6
commit 1c77d61
Showing
3 changed files
with
34 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...t/java/src/main/java/io/openlineage/client/transports/HttpTransportResponseException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
/* Copyright 2018-2024 contributors to the OpenLineage project | ||
/* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.openlineage.client.transports; | ||
|
||
import io.openlineage.client.*; | ||
import lombok.*; | ||
|
||
/** An exception thrown to indicate a client error relating to a http response. */ | ||
@Getter | ||
public class HttpTransportResponseException extends OpenLineageClientException { | ||
private static final long serialVersionUID = 1L; | ||
|
||
private final int statusCode; | ||
private final String body; | ||
|
||
public HttpTransportResponseException(int statusCode, String body) { | ||
super(String.format("code: %d, response: %s", statusCode, body), null); | ||
this.statusCode = statusCode; | ||
this.body = body; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters