소스 검색

refactor: using standard error type name

Yeuoly 10 달 전
부모
커밋
9a0946d442
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      internal/core/plugin_manager/aws_manager/io.go

+ 5 - 5
internal/core/plugin_manager/aws_manager/io.go

@@ -36,7 +36,7 @@ func (r *AWSPluginRuntime) Write(session_id string, data []byte) {
 		l.Send(plugin_entities.SessionMessage{
 			Type: plugin_entities.SESSION_MESSAGE_TYPE_ERROR,
 			Data: parser.MarshalJsonBytes(plugin_entities.ErrorResponse{
-				ErrorType: "inner_error",
+				ErrorType: "PluginDaemonInnerError",
 				Message:   fmt.Sprintf("Error creating request: %v", err),
 			}),
 		})
@@ -73,7 +73,7 @@ func (r *AWSPluginRuntime) Write(session_id string, data []byte) {
 			l.Send(plugin_entities.SessionMessage{
 				Type: plugin_entities.SESSION_MESSAGE_TYPE_ERROR,
 				Data: parser.MarshalJsonBytes(plugin_entities.ErrorResponse{
-					ErrorType: "inner_error",
+					ErrorType: "PluginDaemonInnerError",
 					Message:   fmt.Sprintf("Error sending request to aws lambda: %v", err),
 				}),
 			})
@@ -98,7 +98,7 @@ func (r *AWSPluginRuntime) Write(session_id string, data []byte) {
 						l.Send(plugin_entities.SessionMessage{
 							Type: plugin_entities.SESSION_MESSAGE_TYPE_ERROR,
 							Data: parser.MarshalJsonBytes(plugin_entities.ErrorResponse{
-								ErrorType: "inner_error",
+								ErrorType: "PluginDaemonInnerError",
 								Message:   fmt.Sprintf("failed to parse session message %s, err: %v", bytes, err),
 							}),
 						})
@@ -111,7 +111,7 @@ func (r *AWSPluginRuntime) Write(session_id string, data []byte) {
 					l.Send(plugin_entities.SessionMessage{
 						Type: plugin_entities.SESSION_MESSAGE_TYPE_ERROR,
 						Data: parser.MarshalJsonBytes(plugin_entities.ErrorResponse{
-							ErrorType: "inner_error",
+							ErrorType: "PluginDaemonInnerError",
 							Message:   fmt.Sprintf("encountered an error: %v", err),
 						}),
 					})
@@ -124,7 +124,7 @@ func (r *AWSPluginRuntime) Write(session_id string, data []byte) {
 			l.Send(plugin_entities.SessionMessage{
 				Type: plugin_entities.SESSION_MESSAGE_TYPE_ERROR,
 				Data: parser.MarshalJsonBytes(plugin_entities.ErrorResponse{
-					ErrorType: "inner_error",
+					ErrorType: "PluginDaemonInnerError",
 					Message:   fmt.Sprintf("failed to read response body: %v", scanner.Err()),
 				}),
 			})