return this.http
      .delete<void>(attachment._links.delete.href, { withCredentials: true, headers })
      .pipe(
        tap(() => removeEntityFromCollectionAndState(this.store, attachment.id, collectionKey)),
        catchError((error:HttpErrorResponse) => {