TruBudget icon indicating copy to clipboard operation
TruBudget copied to clipboard

api: The RPC-Client logs expected error streamalreadyexists SP 1

Open Stezido opened this issue 2 years ago • 0 comments

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Description 😯

If the api should create a steram it's using the rpc-client trying to create one the multichain daemon responds with an error -708 alreadyexists. Since it should only be a check if the stream already exists no error should be printed. The RPC-Client should not include this exception. The better solution would be to rewrite the ensureStreamexists function so it checks the stream via get command first and checks the results. This way the api does 2 calls and may be slower, on the other side a stream creation isn't a task which occurs very often so less performance is fine.

How to reproduce 🕹

Start a blockchain connect the api to the chain with an existing organization stream.

Your Environment 🌎

Tech Version
Frontend v1.?.?
API v1.?.?
Blockchain v1.?.?
Export-Service v1.?.?
Email-Service v1.?.?
Storage-Service v1.?.?

Stezido avatar Apr 13 '22 16:04 Stezido