Skip to content

Commit

Permalink
r/aws_medialive_multiplex_program: handle not found exception on delete
Browse files Browse the repository at this point in the history
  • Loading branch information
jar-b committed Dec 5, 2022
1 parent 07e733a commit 4e8075d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/service/medialive/multiplex_program.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,14 +399,16 @@ func (m *multiplexProgram) Delete(ctx context.Context, req resource.DeleteReques
})

if err != nil {
var nfe *mltypes.NotFoundException
if errors.As(err, &nfe) {
return
}
resp.Diagnostics.AddError(
create.ProblemStandardMessage(names.MediaLive, create.ErrActionDeleting, ResNameMultiplexProgram, state.ProgramName.String(), nil),
err.Error(),
)
return
}

resp.State.RemoveResource(ctx)
}

func (m *multiplexProgram) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {
Expand Down

0 comments on commit 4e8075d

Please sign in to comment.