We encountered a case where a query_stream can return an :error.
For us it occurred when an SObject had fields that had been renamed since the last time we connected and we had used a query for an old field name.
We have added case statements for the possible :error return state.
Because ex_force was not expecting a {:error, something} result, it would throw a runtime exception, which would bring down the parent GenServer.
We will now be able to expect a possible :error return ourselves and handle gracefully. In our specific case, we will make a new metadata SOAP request to update the known field names for the objects we wish to query. This is a side-effect of not being able to issue SELECT * FROM something queries in Salesforce query language.
We encountered a case where a
query_stream
can return an:error
.For us it occurred when an
SObject
had fields that had been renamed since the last time we connected and we had used a query for an old field name.We have added case statements for the possible
:error
return state.Because
ex_force
was not expecting a{:error, something}
result, it would throw a runtime exception, which would bring down the parentGenServer
.We will now be able to expect a possible
:error
return ourselves and handle gracefully. In our specific case, we will make a new metadata SOAP request to update the known field names for the objects we wish to query. This is a side-effect of not being able to issueSELECT * FROM something
queries in Salesforce query language.PR with fix here: https://github.com/chulkilee/ex_force/pull/48