bitcoind: listtransactions return error `Unknown named parameter from` - bitcoind

I want to return a list of wallet transactions via rpc command and set count and offset, but this query
{"method":"listtransactions","params":{"from":"0","count":"1"},"id":1}
returns error message Unknown named parameter from. I read manual https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list and took those fields from there. But seems something not working or I set it wrong? If I skip params, rpc works just fine

If you're sending commands via RPC you need to refer to the Bitcoin RPC API Reference.
Upon looking specifically at listtransactions you will see that there is no from parameter:
Argument #1 - label
Argument #2 - count
Argument #3 - skip
Argument #4 - include_watchonly
You may be confusing the client API with RPC commands (most of which have similar or related command names but have different parameters and syntax).
In this case, from probably correlates to skip which indicates the number of transactions to skip over before returning the transactions indicated in count.

Related

Slack get conversation history for a specific thread

I am trying to fetch the conversation history for a specific thread. I am using
const history = await this.slack.conversations.history({
channel,
latest: threadTs,
});
But I am getting the conversation history for the whole channel instead of just for the the threadTs that I am passing to latest. Is what Im trying to do possible? I am using the 'latest' argument because it was suggesting in another StackOverflow post.
Hopefully, you've since found the answer yourself, but just in case: the API method you're looking for is conversations.replies. It takes a channel and a ts parameter, where the latter is the identifier for the message which started the thread.
From the documentation page linked above:
This Conversations API method returns an entire thread (a message plus all the messages in reply to it), while conversations.history method returns only parent messages.
One small note: as you can see, the returned list will always contain the originating message (the one whose ts you're passing).

Missing or Invalid Url Parameter with Twitter API

I am using the Twitter API's Search Tweets endpoint (https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets) to search for tweets on a particular topic. My application is written in Java and uses Twitter4j. I follow the guidelines (i.e. no more than 180 calls per minute and no more than 500 characters per query) however I do have a test case that has 50 word exclusions (so the total character count is 397). My test program also runs 100 such searches in rapid succession though, like I said, I observe the rate limits strictly.
The odd behavior I'm seeing is that the test runs fine and gets results initially, but after an arbitrary period of time, I start getting the following error:
Message: Missing or invalid url parameter. 403:The request is understood, but it has been refused. An accompanying error message will explain why. This code is used when requests are being denied due to update limits (https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following).
message - Missing or invalid url parameter.
code - 195
The error message confuses me because I'm not trying to perform any of the update actions listed in the link provided. I'm just searching tweets. I'm also not sure what "missing or invalid url parameter" means. Is a query parameter missing from my request? The only required parameter is the query itself which I am definitely passing. The url is definitely correct unless Twitter4j is generating incorrect urls. So what does this message mean?
When I stop and restart the search (i.e. the max_id and since_id values get reset to -1, the searches start working again...for a while. As far as I know, nothing else about the search changes when it is restarted. Just those two ids.

Proper way to return error from within a mutateAndGetPayload

I am doing a number of business logic checks within the mutateAndGetPayload function of a relay mutation using the graphql-relay library. For any of these checks that fail I have an else clause that will throw an error, ig throw('You do not have permission to delete this resource');, however, when that happens, I get the error Cannot set property 'clientMutationId' of undefined returned to the frontend instead of the error I'm trying to return. It seems that I'm seeing this error because I'm not returning something this mutation cares about (or a promise that resolves to one), so I'm a little stumped ... what's the proper way to throw/return errors back to the client here?
One way is to use the GraphQLError Type
Working in NodeJS on the back end we have used the following library:
https://github.com/graphql/graphql-js/tree/master/src/error
However, what we have ended up using is a library that provides more flexibility:
https://github.com/kadirahq/graphql-errors
Either of these would be the best place to start.

Handling of batch requests in SAPUI5 with sap.ui.model.odata.v2.ODataModel

If I change a property of an OData entity to an invalid value (SAPUI5 client) and send that value to SAP Gateway Server using submitChanges I got the following message in the log file:
Service returned messages for entities that were not requested. This
might lead to wrong message processing and loss of messages
Now I would expect that the callback for "error" would be called but it is always "success".
Inside the callback for success I have a list of responses (in this case with an error).
Now I am asking me, why the error callback is not called?
I assume because the overall batch response is most of the time "OK" also if one request of the batch contains an error?
So do I have to implement error handling in the success callback? Or should the server send an overall error response?
I am using SAPUI5 1.28.15 (with 1.30.6 at least the cited message seems to be removed) and switched batch mode to "on" (if batch mode is off, callback will not be called!).

DDEML connection fails after large number of calls

Our Delphi 7 application communicates with the OpenOffice Calc DDE service, sOffice, using DDEML. It uses the service to read from a spreadsheet.
We've ran into a curious issue. After a large number of calls to 'DdeClientTransaction', the function returns a value of zero, indicating that it has failed. This failure is accompanied with the error 'DMLERR_NOTPROCESSED', which, according to http://www.opcdatahub.com/Docs/dhw-ax-windowsddeerrornumbers.html, means 'Receiving task was not interested in message'.
This is what we would expect to see if the DDE command was invalid. That is definitely not the case here. It happens after 16375 calls to 'DdeClientTransaction'. We can replicate this every time, over different spreadsheets.
To further confuse things, if we call DDEConnect after this failure, it returns a negative value. As far as we can tell, this is undocumented behavior. The function should return a positive handle or zero to indicate failure.
What's going on with the DDE connection and how do we fix it?

Resources