You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2023/10/31 11:00:20 UTC
(flink) branch master updated: [hotfix][rest] Improve error message
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 81d559a3bb1 [hotfix][rest] Improve error message
81d559a3bb1 is described below
commit 81d559a3bb11722f5148a9f4ad42e60105ae27a2
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Mon Oct 30 14:37:25 2023 +0100
[hotfix][rest] Improve error message
---
.../org/apache/flink/runtime/rest/messages/MessageHeaders.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/MessageHeaders.java b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/MessageHeaders.java
index 63c54083493..122429e3c0d 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/MessageHeaders.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/MessageHeaders.java
@@ -78,12 +78,15 @@ public interface MessageHeaders<
* @return short description
*/
default String operationId() {
+ final String className = getClass().getSimpleName();
+
if (getHttpMethod() != HttpMethodWrapper.GET) {
throw new UnsupportedOperationException(
- "The default implementation is only supported for GET calls. Please override 'operationId()'.");
+ "The default implementation is only supported for GET calls. Please override 'operationId()' in '"
+ + className
+ + "'.");
}
- final String className = getClass().getSimpleName();
final int headersSuffixStart = className.lastIndexOf("Headers");
if (headersSuffixStart == -1) {
throw new IllegalStateException(