// Copyright © 2021 Luther Systems, Ltd. All right reserved. syntax = "proto3"; // The common package provides common models used across the Luther stack. // Particularly for exceptions. package common.v1; option go_package = "buf.build/gen/go/luthersystems/protos/protocolbuffers/go/common/v1"; // General message for exceptions. message Exception { // Type of exception. enum Type { // Default for no exception. INVALID_TYPE = 0; // Business logic error. BUSINESS = 1; // A service was unavailable. SERVICE_NOT_AVAILABLE = 2; // Infrastructure was down. INFRASTRUCTURE = 3; // Catch-all for all other types. UNEXPECTED = 4; // Security related error. SECURITY_VIOLATION = 5; } // UUID for exception. string id = 1; // Type of exception. Type type = 2; // Timestamp for when the exception occurred (RFC3339). string timestamp = 3; // Human readable description of exception. string description = 4; // Additional metadata about the exception. map exception_metadata = 5; } // Exception messages. message ExceptionResponse { // An exception if an error occurred during processing request. Exception exception = 1; }