Skip to content

Commit

Permalink
Merge pull request #102 from yi2020/minor_error_message_fix
Browse files Browse the repository at this point in the history
Updated an error message to make it easier to figure out how to fix the issue
  • Loading branch information
DRuggeri authored Oct 29, 2020
2 parents bdce6e5 + 5410109 commit 11db1f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion restapi/api_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func (obj *api_object) create_object() error {
with the id of whatever gets created, we have no way to know what
the object's id will be. Abandon this attempt */
if obj.id == "" && !obj.api_client.write_returns_object && !obj.api_client.create_returns_object {
return errors.New("ERROR: Provided object does not have an id set and the client is not configured to read the object from a POST or PUT response. Without an id, the object cannot be managed.")
return errors.New("ERROR: Provided object does not have an id set and the client is not configured to read the object from a POST or PUT response. Please set write_returns_object to true, or include an id in the object's data.")
}

b, _ := json.Marshal(obj.data)
Expand Down

0 comments on commit 11db1f5

Please sign in to comment.