From bcd7b9a3506f9f2b9cd31ef30751d52306c33038 Mon Sep 17 00:00:00 2001 From: Michael Davis <michael.davis@cern.ch> Date: Wed, 6 Dec 2017 16:58:10 +0100 Subject: [PATCH] [xrd_ssi] Handle USER_ERROR response in EosCta_Stub --- cmdline/EosCtaStub.cpp | 1 + xroot_plugins/messages/cta_frontend.proto | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmdline/EosCtaStub.cpp b/cmdline/EosCtaStub.cpp index ccf05eb125..c0f6ea3cdb 100644 --- a/cmdline/EosCtaStub.cpp +++ b/cmdline/EosCtaStub.cpp @@ -319,6 +319,7 @@ int exceptionThrowingMain(int argc, const char *const *const argv) break; case Response::RSP_ERR_PROTOBUF: throw XrdSsiPb::PbException(response.message_txt()); case Response::RSP_ERR_CTA: throw std::runtime_error(response.message_txt()); + case Response::RSP_ERR_USER: throw std::runtime_error(response.message_txt()); // ... define other response types in the protocol buffer (e.g. user error) default: throw XrdSsiPb::PbException("Invalid response type."); } diff --git a/xroot_plugins/messages/cta_frontend.proto b/xroot_plugins/messages/cta_frontend.proto index 741c97f2f4..2a643d3962 100644 --- a/xroot_plugins/messages/cta_frontend.proto +++ b/xroot_plugins/messages/cta_frontend.proto @@ -42,8 +42,8 @@ message Response { RSP_INVALID = 0; //< Response type was not set RSP_SUCCESS = 1; //< Request is valid and was accepted for processing RSP_ERR_PROTOBUF = 2; //< Framework error caused by Google Protocol Buffers layer - RSP_ERR_USER = 3; //< User request is invalid - RSP_ERR_CTA = 4; //< Server error reported by CTA Frontend + RSP_ERR_CTA = 3; //< Server error reported by CTA Frontend + RSP_ERR_USER = 4; //< User request is invalid } ResponseType type = 1; //< Encode the type of this response string message_txt = 2; //< Optional response message text -- GitLab