You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of a panic we should return a meaningful error. To do this we should verify the object metadata exists in the forceApi.apiSObjects map before trying to access it.
e.g.
data, ok := forceApi.apiSObjects["SOME_OBJECT_NAME"]
if !ok {
return fmt.Errorf("Unable to find metadata for object: %s", "SOME_OBJECT_NAME")
}
The text was updated successfully, but these errors were encountered:
Today if you attempt to interact with an SObject that doesn't exist in SalesForce the force package will panic.
Instead of a panic we should return a meaningful error. To do this we should verify the object metadata exists in the forceApi.apiSObjects map before trying to access it.
e.g.
The text was updated successfully, but these errors were encountered: