Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC maker/start returns 409 error if no coins #1142

Merged
merged 1 commit into from
Jan 10, 2022
Merged

Conversation

AdamISZ
Copy link
Member

@AdamISZ AdamISZ commented Jan 7, 2022

Fixes #1120. As per the discussion in that issue, while
we can only return 'processing started' by default, and
the client must monitor progress/state to see if the maker
service has connected successfully, nevertheless if the
maker startup is immediately invalidated by the fact that
the already-synced wallet does not contain confirmed coins,
we can and should return an error message instead of a 202.
This commit does that, adding to the spec a 409-No-Coins
response type which indicates to the API client that the
setup of the maker failed for this specific reason.

@AdamISZ
Copy link
Member Author

AdamISZ commented Jan 8, 2022

bd33b6d is an edit (x2), because I forgot to specify minconfs=1 in the get_balance_by_mixdepth() call, and forgot to remove the old exception type for ServiceAlreadyStarted.

Fixes #1120. As per the discussion in that issue, while
we can only return 'processing started' by default, and
the client must monitor progress/state to see if the maker
service has connected successfully, nevertheless if the
maker startup is immediately invalidated by the fact that
the already-synced wallet does not contain confirmed coins,
we can and should return an error message instead of a 202.
This commit does that, adding to the spec a 409-No-Coins
response type which indicates to the API client that the
setup of the maker failed for this specific reason.
@AdamISZ AdamISZ force-pushed the rpc-nocoins-maker branch from c20193e to bd33b6d Compare January 8, 2022 20:08
@AdamISZ AdamISZ merged commit 8b3d21f into master Jan 10, 2022
@AdamISZ
Copy link
Member Author

AdamISZ commented Jan 10, 2022

Rationale for merging as per #1137 (comment)

@AdamISZ AdamISZ deleted the rpc-nocoins-maker branch January 10, 2022 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API: Maker responses with proper info
1 participant