Closed suranyami closed 3 years ago
Hello, @suranyami! This is your first Pull Request that will be reviewed by SourceLevel, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.
SourceLevel has finished reviewing this Pull Request and has found:
But beware that this branch is 6 commits behind the chulkilee:main
branch, and a review of an up to date branch would produce more accurate results.
Closing this PR, because #50 does a better job of making the returns consistent.
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.