Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DuniterPy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
python
DuniterPy
Commits
9bf9b608
Commit
9bf9b608
authored
9 years ago
by
inso
Browse files
Options
Downloads
Patches
Plain Diff
Ucoin Errors
parent
70b0367f
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
ucoinpy/api/bma/__init__.py
+1
-1
1 addition, 1 deletion
ucoinpy/api/bma/__init__.py
ucoinpy/api/bma/api.py
+2
-9
2 additions, 9 deletions
ucoinpy/api/bma/api.py
ucoinpy/api/errors.py
+45
-0
45 additions, 0 deletions
ucoinpy/api/errors.py
with
48 additions
and
10 deletions
ucoinpy/api/bma/__init__.py
+
1
−
1
View file @
9bf9b608
...
...
@@ -26,5 +26,5 @@ import logging
logger
=
logging
.
getLogger
(
"
ucoin
"
)
from
.api
import
API
,
ConnectionHandler
,
UcoinError
from
.api
import
API
,
ConnectionHandler
from
.
import
network
,
blockchain
,
tx
,
wot
,
node
,
ud
,
ws
\ No newline at end of file
This diff is collapsed.
Click to expand it.
ucoinpy/api/bma/api.py
+
2
−
9
View file @
9bf9b608
...
...
@@ -20,16 +20,9 @@
import
aiohttp
,
json
,
logging
,
jsonschema
logger
=
logging
.
getLogger
(
"
ucoin
"
)
from
..errors
import
UcoinError
class
UcoinError
(
Exception
):
"""
UCoin error
"""
def
__init__
(
self
,
data
):
super
().
__init__
(
"
Error code {0} - {1}
"
.
format
(
data
[
"
ucode
"
],
data
[
"
message
"
]))
self
.
error
=
data
logger
=
logging
.
getLogger
(
"
ucoin
"
)
class
ConnectionHandler
(
object
):
...
...
This diff is collapsed.
Click to expand it.
ucoinpy/api/errors.py
0 → 100644
+
45
−
0
View file @
9bf9b608
class
UcoinError
(
Exception
):
"""
UCoin error
"""
def
__init__
(
self
,
data
):
super
().
__init__
(
"
Error code {0} - {1}
"
.
format
(
data
[
"
ucode
"
],
data
[
"
message
"
]))
self
.
ucode
=
data
[
"
ucode
"
]
self
.
message
=
data
[
"
message
"
]
UNKNOWN
=
1001
UNHANDLED
=
1002
SIGNATURE_DOES_NOT_MATCH
=
1003
ALREADY_UP_TO_DATE
=
1004
WRONG_DOCUMENT
=
1005
HTTP_PARAM_PUBKEY_REQUIRED
=
1101
HTTP_PARAM_IDENTITY_REQUIRED
=
1102
HTTP_PARAM_PEER_REQUIRED
=
1103
HTTP_PARAM_BLOCK_REQUIRED
=
1104
HTTP_PARAM_MEMBERSHIP_REQUIRED
=
1105
HTTP_PARAM_TX_REQUIRED
=
1106
HTTP_PARAM_SIG_REQUIRED
=
1107
HTTP_PARAM_CERT_REQUIRED
=
1108
HTTP_PARAM_REVOCATION_REQUIRED
=
1109
HTTP_PARAM_CONF_REQUIRED
=
1110
NO_MATCHING_IDENTITY
=
2001
UID_ALREADY_USED
=
2002
PUBKEY_ALREADY_USED
=
2003
NO_MEMBER_MATCHING_PUB_OR_UID
=
2004
SELF_PEER_NOT_FOUND
=
2005
WRONG_SIGNATURE_MEMBERSHIP
=
2006
ALREADY_RECEIVED_MEMBERSHIP
=
2007
MEMBERSHIP_A_NON_MEMBER_CANNOT_LEAVE
=
2008
NOT_A_MEMBER
=
2009
NO_CURRENT_BLOCK
=
2010
BLOCK_NOT_FOUND
=
2011
PEER_NOT_FOUND
=
2012
WRONG_UNLOCKER
=
2013
LOCKTIME_PREVENT
=
2014
SOURCE_ALREADY_CONSUMED
=
2015
WRONG_AMOUNTS
=
2016
WRONG_OUTPUT_BASE
=
2017
CANNOT_ROOT_BLOCK_NO_MEMBERS
=
2018
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment