Skip to content

Commit

Permalink
fix: delete error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuochi committed Jun 20, 2023
1 parent d06b9ba commit 85ccd1c
Show file tree
Hide file tree
Showing 86 changed files with 86 additions and 86 deletions.
2 changes: 1 addition & 1 deletion internal/provider/custom_format_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func (r *CustomFormatResource) Delete(ctx context.Context, req resource.DeleteRe
// Delete CustomFormat current value
_, err := r.client.CustomFormatApi.DeleteCustomFormat(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, customFormatResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, customFormatResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/delay_profile_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func (r *DelayProfileResource) Delete(ctx context.Context, req resource.DeleteRe
// Delete delayprofile current value
_, err := r.client.DelayProfileApi.DeleteDelayProfile(ctx, int32(profile.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, delayProfileResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, delayProfileResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/download_client_aria2_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func (r *DownloadClientAria2Resource) Delete(ctx context.Context, req resource.D
// Delete DownloadClientAria2 current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientAria2ResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientAria2ResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/download_client_deluge_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func (r *DownloadClientDelugeResource) Delete(ctx context.Context, req resource.
// Delete DownloadClientDeluge current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientDelugeResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientDelugeResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/download_client_flood_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func (r *DownloadClientFloodResource) Delete(ctx context.Context, req resource.D
// Delete DownloadClientFlood current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientFloodResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientFloodResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/download_client_freebox_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func (r *DownloadClientFreeboxResource) Delete(ctx context.Context, req resource
// Delete DownloadClientFreebox current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientFreeboxResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientFreeboxResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/download_client_hadouken_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func (r *DownloadClientHadoukenResource) Delete(ctx context.Context, req resourc
// Delete DownloadClientHadouken current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientHadoukenResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientHadoukenResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/download_client_nzbget_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func (r *DownloadClientNzbgetResource) Delete(ctx context.Context, req resource.
// Delete DownloadClientNzbget current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientNzbgetResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientNzbgetResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/download_client_nzbvortex_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func (r *DownloadClientNzbvortexResource) Delete(ctx context.Context, req resour
// Delete DownloadClientNzbvortex current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientNzbvortexResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientNzbvortexResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/download_client_pneumatic_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func (r *DownloadClientPneumaticResource) Delete(ctx context.Context, req resour
// Delete DownloadClientPneumatic current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientPneumaticResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientPneumaticResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/download_client_qbittorrent_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ func (r *DownloadClientQbittorrentResource) Delete(ctx context.Context, req reso
// Delete DownloadClientQbittorrent current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientQbittorrentResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientQbittorrentResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/download_client_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ func (r *DownloadClientResource) Delete(ctx context.Context, req resource.Delete
// Delete DownloadClient current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/download_client_rtorrent_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func (r *DownloadClientRtorrentResource) Delete(ctx context.Context, req resourc
// Delete DownloadClientRtorrent current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientRtorrentResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientRtorrentResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/download_client_sabnzbd_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ func (r *DownloadClientSabnzbdResource) Delete(ctx context.Context, req resource
// Delete DownloadClientSabnzbd current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientSabnzbdResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientSabnzbdResourceName, err))

return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func (r *DownloadClientTorrentBlackholeResource) Delete(ctx context.Context, req
// Delete DownloadClientTorrentBlackhole current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientTorrentBlackholeResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientTorrentBlackholeResourceName, err))

return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ func (r *DownloadClientTorrentDownloadStationResource) Delete(ctx context.Contex
// Delete DownloadClientTorrentDownloadStation current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientTorrentDownloadStationResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientTorrentDownloadStationResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/download_client_transmission_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ func (r *DownloadClientTransmissionResource) Delete(ctx context.Context, req res
// Delete DownloadClientTransmission current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientTransmissionResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientTransmissionResourceName, err))

return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func (r *DownloadClientUsenetBlackholeResource) Delete(ctx context.Context, req
// Delete DownloadClientUsenetBlackhole current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientUsenetBlackholeResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientUsenetBlackholeResourceName, err))

return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ func (r *DownloadClientUsenetDownloadStationResource) Delete(ctx context.Context
// Delete DownloadClientUsenetDownloadStation current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientUsenetDownloadStationResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientUsenetDownloadStationResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/download_client_utorrent_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ func (r *DownloadClientUtorrentResource) Delete(ctx context.Context, req resourc
// Delete DownloadClientUtorrent current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientUtorrentResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientUtorrentResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/download_client_vuze_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ func (r *DownloadClientVuzeResource) Delete(ctx context.Context, req resource.De
// Delete DownloadClientVuze current value
_, err := r.client.DownloadClientApi.DeleteDownloadClient(ctx, int32(client.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, downloadClientVuzeResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, downloadClientVuzeResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/import_list_couch_potato_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func (r *ImportListCouchPotatoResource) Delete(ctx context.Context, req resource
// Delete ImportListCouchPotato current value
_, err := r.client.ImportListApi.DeleteImportList(ctx, int32(importList.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, importListCouchPotatoResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, importListCouchPotatoResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/import_list_custom_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func (r *ImportListCustomResource) Delete(ctx context.Context, req resource.Dele
// Delete ImportListCustom current value
_, err := r.client.ImportListApi.DeleteImportList(ctx, int32(importList.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, importListCustomResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, importListCustomResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/import_list_exclusion_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func (r *ImportListExclusionResource) Delete(ctx context.Context, req resource.D
// Delete importListExclusion current value
_, err := r.client.ImportExclusionsApi.DeleteExclusions(ctx, int32(importListExclusion.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, importListExclusionResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, importListExclusionResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/import_list_imdb_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func (r *ImportListIMDBResource) Delete(ctx context.Context, req resource.Delete
// Delete ImportListIMDB current value
_, err := r.client.ImportListApi.DeleteImportList(ctx, int32(importList.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, importListIMDBResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, importListIMDBResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/import_list_plex_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ func (r *ImportListPlexResource) Delete(ctx context.Context, req resource.Delete
// Delete ImportListPlex current value
_, err := r.client.ImportListApi.DeleteImportList(ctx, int32(importList.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, importListPlexResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, importListPlexResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/import_list_radarr_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func (r *ImportListRadarrResource) Delete(ctx context.Context, req resource.Dele
// Delete ImportListRadarr current value
_, err := r.client.ImportListApi.DeleteImportList(ctx, int32(importList.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, importListRadarrResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, importListRadarrResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/import_list_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ func (r *ImportListResource) Delete(ctx context.Context, req resource.DeleteRequ
// Delete ImportList current value
_, err := r.client.ImportListApi.DeleteImportList(ctx, int32(importList.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, importListResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, importListResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/import_list_rss_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func (r *ImportListRSSResource) Delete(ctx context.Context, req resource.DeleteR
// Delete ImportListRSS current value
_, err := r.client.ImportListApi.DeleteImportList(ctx, int32(importList.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, importListRSSResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, importListRSSResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/import_list_stevenlu2_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func (r *ImportListStevenlu2Resource) Delete(ctx context.Context, req resource.D
// Delete ImportListStevenlu2 current value
_, err := r.client.ImportListApi.DeleteImportList(ctx, int32(importList.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, importListStevenlu2ResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, importListStevenlu2ResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/import_list_stevenlu_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func (r *ImportListStevenluResource) Delete(ctx context.Context, req resource.De
// Delete ImportListStevenlu current value
_, err := r.client.ImportListApi.DeleteImportList(ctx, int32(importList.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, importListStevenluResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, importListStevenluResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/import_list_tmdb_company_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func (r *ImportListTMDBCompanyResource) Delete(ctx context.Context, req resource
// Delete ImportListTMDBCompany current value
_, err := r.client.ImportListApi.DeleteImportList(ctx, int32(importList.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, importListTMDBCompanyResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, importListTMDBCompanyResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/import_list_tmdb_keyword_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func (r *ImportListTMDBKeywordResource) Delete(ctx context.Context, req resource
// Delete ImportListTMDBKeyword current value
_, err := r.client.ImportListApi.DeleteImportList(ctx, int32(importList.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, importListTMDBKeywordResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, importListTMDBKeywordResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/import_list_tmdb_list_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func (r *ImportListTMDBListResource) Delete(ctx context.Context, req resource.De
// Delete ImportListTMDBList current value
_, err := r.client.ImportListApi.DeleteImportList(ctx, int32(importList.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, importListTMDBListResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, importListTMDBListResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/import_list_tmdb_person_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ func (r *ImportListTMDBPersonResource) Delete(ctx context.Context, req resource.
// Delete ImportListTMDBPerson current value
_, err := r.client.ImportListApi.DeleteImportList(ctx, int32(importList.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, importListTMDBPersonResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, importListTMDBPersonResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/import_list_tmdb_popular_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ func (r *ImportListTMDBPopularResource) Delete(ctx context.Context, req resource
// Delete ImportListTMDBPopular current value
_, err := r.client.ImportListApi.DeleteImportList(ctx, int32(importList.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, importListTMDBPopularResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, importListTMDBPopularResourceName, err))

return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/import_list_tmdb_user_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func (r *ImportListTMDBUserResource) Delete(ctx context.Context, req resource.De
// Delete ImportListTMDBUser current value
_, err := r.client.ImportListApi.DeleteImportList(ctx, int32(importList.ID.ValueInt64())).Execute()
if err != nil {
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Read, importListTMDBUserResourceName, err))
resp.Diagnostics.AddError(helpers.ClientError, helpers.ParseClientError(helpers.Delete, importListTMDBUserResourceName, err))

return
}
Expand Down
Loading

0 comments on commit 85ccd1c

Please sign in to comment.