Skip to content

Commit

Permalink
fix: allow options read to remove resource if not found
Browse files Browse the repository at this point in the history
  • Loading branch information
cgatt committed Oct 17, 2023
1 parent 96141ca commit 88b7748
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jira/resource_custom_field_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ func resourceCustomFieldOptionsRead(d *schema.ResourceData, m interface{}) error
currentOptions := new(GetFieldOptionsResponse)
err := request(config.jiraClient, "GET", customFieldContextOptionsEndpoint(fieldId, contextId), nil, currentOptions)
if err != nil {
if errors.Is(err, ResourceNotFoundError) {
d.SetId("")
return nil
}
return errors.Wrap(err, "Fetching Jira Field Context Options failed")
}

Expand Down

0 comments on commit 88b7748

Please sign in to comment.