@@ -5,18 +5,10 @@ use thiserror::Error;
55/// Generic error type
66#[ derive( Debug , Error ) ]
77pub enum Error {
8- /// errors that currently return early http status code Status::NotFound
8+ /// errors stemming from resources that were not found
99 #[ error( "not found" ) ]
1010 NotFound ,
1111
12- /// errors stemming from trying to do invalid operations
13- #[ error( "invalid operation" ) ]
14- InvalidOperation ,
15-
16- /// error returned if the given file upload id is not a temp file we have
17- #[ error( "No file found for file upload id" ) ]
18- NoFileForFileUploadId ,
19-
2012 /// errors that stem from interacting with a blockchain
2113 #[ error( "Blockchain error: {0}" ) ]
2214 Blockchain ( #[ from] blockchain:: Error ) ,
@@ -39,49 +31,6 @@ pub enum Error {
3931 #[ error( "Protocol error: {0}" ) ]
4032 Protocol ( #[ from] bcr_ebill_core:: protocol:: ProtocolError ) ,
4133
42- #[ error( "io error {0}" ) ]
43- Io ( #[ from] std:: io:: Error ) ,
44-
45- /// errors that stem from drawee identity not being in the contacts
46- #[ error( "Can not get drawee identity from contacts." ) ]
47- DraweeNotInContacts ,
48-
49- /// errors that stem from payee identity not being in the contacts
50- #[ error( "Can not get payee identity from contacts." ) ]
51- PayeeNotInContacts ,
52-
53- /// errors that stem from buyer identity not being in the contacts
54- #[ error( "Can not get buyer identity from contacts." ) ]
55- BuyerNotInContacts ,
56-
57- /// errors that stem from endorsee identity not being in the contacts
58- #[ error( "Can not get endorsee identity from contacts." ) ]
59- EndorseeNotInContacts ,
60-
61- /// errors that stem from mint identity not being in the contacts
62- #[ error( "Can not get mint identity from contacts." ) ]
63- MintNotInContacts ,
64-
65- /// errors that stem from recoursee identity not being in the contacts
66- #[ error( "Can not get recoursee identity from contacts." ) ]
67- RecourseeNotInContacts ,
68-
69- /// errors that stem from trying to cancel a mint request that's not pending
70- #[ error( "Mint request can only be cancelled if it's pending." ) ]
71- CancelMintRequestNotPending ,
72-
73- /// errors that stem from trying to reject a mint request that's not offered
74- #[ error( "Mint request can only be rejected if it's offered." ) ]
75- RejectMintRequestNotOffered ,
76-
77- /// errors that stem from trying to accept a mint request that's not offered
78- #[ error( "Mint request can only be accepted if it's offered." ) ]
79- AcceptMintRequestNotOffered ,
80-
81- /// errors that stem from trying to accept a mint request that's expired
82- #[ error( "Mint request can only be accepted if it's not expired." ) ]
83- AcceptMintOfferExpired ,
84-
8534 /// errors that stem from bill validation errors
8635 #[ error( "bill validation error {0}" ) ]
8736 Validation ( #[ from] bcr_ebill_core:: ValidationError ) ,
0 commit comments