1 | package org.cardanofoundation.explorer.api.exception; | |
2 | ||
3 | import org.cardanofoundation.explorer.common.exception.ErrorCode; | |
4 | ||
5 | public enum BusinessCode implements ErrorCode { | |
6 | EPOCH_NOT_FOUND("404-EPOCH_NOT_FOUND", "Epoch not found"), | |
7 | BLOCK_NOT_FOUND("404-BLOCK_NOT_FOUND", "Block not found"), | |
8 | TRANSACTION_NOT_FOUND("404-TRANSACTION_NOT_FOUND", "Transaction not found"), | |
9 | ADDRESS_NOT_FOUND("404-ADDRESS_NOT_FOUND", "Wallet address not found"), | |
10 | STAKE_ADDRESS_NOT_FOUND("404-STAKE_ADDRESS_NOT_FOUND", "Stake address not found"), | |
11 | TOKEN_NOT_FOUND("404-TOKEN_NOT_FOUND", "Token not found"), | |
12 | POLICY_NOT_FOUND("404-POLICY_NOT_FOUND", "Policy not found"), | |
13 | STAKE_REGISTRATION_NOT_FOUND("404-STAKE_REGISTRATION_NOT_FOUND", "Stake registration not found"), | |
14 | STAKE_DE_REGISTRATION_NOT_FOUND( | |
15 | "404-STAKE_DEREGISTRATION_NOT_FOUND", "Stake de-registration not found"), | |
16 | STAKE_DELEGATION_NOT_FOUND("404-STAKE_DELEGATION_NOT_FOUND", "Stake delegation not found"), | |
17 | STAKE_WITHDRAWAL_NOT_FOUND("404-STAKE_DELEGATION_NOT_FOUND", "Stake delegation not found"), | |
18 | STAKE_REPORT_HISTORY_NOT_FOUND( | |
19 | "404-STAKE_REPORT_HISTORY_NOT_FOUND", "Stake report history not found"), | |
20 | POOL_REPORT_HISTORY_NOT_FOUND( | |
21 | "404-POOL_REPORT_HISTORY_NOT_FOUND", "Pool report history not found"), | |
22 | REPORT_IS_IN_PROGRESS("404-REPORT_IS_IN_PROGRESS", "Report is in progress"), | |
23 | POOL_NOT_FOUND("404-POOL_NOT_FOUND", "PoolId not found"), | |
24 | EXPORT_TYPE_NOT_SUPPORTED("404-EXPORT_TYPE_NOT_SUPPORTED", "Export type not supported"), | |
25 | PROTOCOL_FIELD_NOT_FOUND("404-PROTOCOL_FIELD_NOT_FOUND", "this field is not support"), | |
26 | SCRIPT_NOT_FOUND("404-SCRIPT_NOT_FOUND", "Script not found"), | |
27 | VERIFY_SCRIPT_FAILED("400-VERIFY_SCRIPT_FAILED", "Verify script failed"), | |
28 | SCRIPT_ALREADY_VERIFIED("400-SCRIPT_ALREADY_VERIFIED", "Script already verified"), | |
29 | FETCH_REWARD_ERROR("500-FETCH_REWARD_ERROR", "Fetch reward error"), | |
30 | TIME_RANGE_ILLEGAL("400-TIME_RANGE_ILLEGAL", "Time range is illegal"), | |
31 | REPORT_LIMIT_REACHED("400-REPORT_LIMIT_REACHED", "Report limit reached"), | |
32 | OUT_OF_QUERY_LIMIT("400-OUT_OF_QUERY_LIMIT", "Out of query limit"), | |
33 | EXTERNAL_API_IS_NOT_AVAILABLE( | |
34 | "500-EXTERNAL_API_IS_NOT_AVAILABLE", "External API is not available"), | |
35 | ||
36 | GOVERNANCE_ACTION_NOT_FOUND("404-GOVERNANCE_ACTION_NOT_FOUND", "Governance action not found"), | |
37 | DREP_NOT_FOUND("404-DREP_NOT_FOUND", "DRep not found"), | |
38 | COMMITTEE_MEMBER_NOT_FOUND("404-COMMITTEE_MEMBER_NOT_FOUND", "Committee member not found"), | |
39 | CREATE_REPORT_ERROR("400-CREATE_REPORT_ERROR", "Create report error"); | |
40 | ||
41 | private final String code; | |
42 | private final String desc; | |
43 | ||
44 | BusinessCode(String code, String desc) { | |
45 | this.code = code; | |
46 | this.desc = desc; | |
47 | } | |
48 | ||
49 | public String getCode() { | |
50 |
1
1. getCode : replaced return value with "" for org/cardanofoundation/explorer/api/exception/BusinessCode::getCode → SURVIVED |
return this.code; |
51 | } | |
52 | ||
53 | public String getDesc() { | |
54 |
1
1. getDesc : replaced return value with "" for org/cardanofoundation/explorer/api/exception/BusinessCode::getDesc → SURVIVED |
return this.desc; |
55 | } | |
56 | ||
57 | public String getServicePrefix() { | |
58 |
1
1. getServicePrefix : replaced return value with "" for org/cardanofoundation/explorer/api/exception/BusinessCode::getServicePrefix → SURVIVED |
return "BC"; |
59 | } | |
60 | } | |
Mutations | ||
50 |
1.1 |
|
54 |
1.1 |
|
58 |
1.1 |