LCOV - code coverage report
Current view: top level - irohad/model/queries/responses - error_response.hpp (source / functions) Hit Total Coverage
Test: cleared_cor.info Lines: 0 1 0.0 %
Date: 2019-03-07 14:46:43 Functions: 0 9 0.0 %

          Line data    Source code
       1             : /**
       2             :  * Copyright Soramitsu Co., Ltd. All Rights Reserved.
       3             :  * SPDX-License-Identifier: Apache-2.0
       4             :  */
       5             : 
       6             : #ifndef IROHA_ERROR_RESPONSE_HPP
       7             : #define IROHA_ERROR_RESPONSE_HPP
       8             : 
       9             : #include <string>
      10             : #include "model/query_response.hpp"
      11             : 
      12             : namespace iroha {
      13             :   namespace model {
      14             : 
      15             :     /**
      16             :      * Provide error answer with reason about error
      17             :      */
      18             :     struct ErrorResponse : public QueryResponse {
      19             :       /**
      20             :        * Reason of error
      21             :        */
      22             :       enum Reason {
      23             :         /**
      24             :          * signatures or created time are invalid
      25             :          */
      26             :         STATELESS_INVALID,
      27             :         /**
      28             :          * permissions are invalid
      29             :          */
      30             :         STATEFUL_INVALID,
      31             :         /**
      32             :          * when requested account does not exist
      33             :          */
      34             :         NO_ACCOUNT,
      35             :         /**
      36             :          * when requested asset does not exist
      37             :          */
      38             :         NO_ASSET,
      39             :         /**
      40             :          * No Roles found in the system
      41             :          */
      42             :         NO_ROLES,
      43             :         /**
      44             :          * when requested account asset does not exist
      45             :          */
      46             :         NO_ACCOUNT_ASSETS,
      47             :         /**
      48             :          * when requested account detail does not exist
      49             :          */
      50             :         NO_ACCOUNT_DETAIL,
      51             :         /**
      52             :          * when requested signatories does not exist
      53             :          */
      54             :         NO_SIGNATORIES,
      55             :         /**
      56             :          * when unidentified request was received
      57             :          */
      58             :         NOT_SUPPORTED
      59             :       };
      60           0 :       Reason reason{};
      61             :     };
      62             :   }  // namespace model
      63             : }  // namespace iroha
      64             : #endif  // IROHA_ERROR_RESPONSE_HPP

Generated by: LCOV version 1.13