Skip to content

Commit

Permalink
Revert "refactor(SPV-1230): update err message content in http format…
Browse files Browse the repository at this point in the history
…ters."

This reverts commit c45eca0.
  • Loading branch information
mgosek-4chain committed Dec 3, 2024
1 parent c45eca0 commit 9a82be8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions admin_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (a *AdminAPI) XPubs(ctx context.Context, opts ...queries.XPubQueryOption) (
func (a *AdminAPI) Contacts(ctx context.Context, opts ...queries.ContactQueryOption) (*queries.UserContactsPage, error) {
res, err := a.contactsAPI.Contacts(ctx, opts...)
if err != nil {
return nil, contacts.HTTPErrorFormatter("failed to retrieve user contacts page", err).FormatGetErr()
return nil, contacts.HTTPErrorFormatter("retrieve user contacts page", err).FormatGetErr()
}

return res, nil
Expand All @@ -88,7 +88,7 @@ func (a *AdminAPI) Contacts(ctx context.Context, opts ...queries.ContactQueryOpt
func (a *AdminAPI) ContactUpdate(ctx context.Context, cmd *commands.UpdateContact) (*response.Contact, error) {
res, err := a.contactsAPI.UpdateContact(ctx, cmd)
if err != nil {
msg := fmt.Sprintf("failed to update contact with ID: %s", cmd.ID)
msg := fmt.Sprintf("update contact with ID: %s", cmd.ID)
return nil, contacts.HTTPErrorFormatter(msg, err).FormatPutErr()
}

Expand All @@ -101,7 +101,7 @@ func (a *AdminAPI) ContactUpdate(ctx context.Context, cmd *commands.UpdateContac
func (a *AdminAPI) DeleteContact(ctx context.Context, ID string) error {
err := a.contactsAPI.DeleteContact(ctx, ID)
if err != nil {
msg := fmt.Sprintf("failed to delete contact with ID: %s", ID)
msg := fmt.Sprintf("delete contact with ID: %s", ID)
return contacts.HTTPErrorFormatter(msg, err).FormatDeleteErr()
}

Expand All @@ -113,7 +113,7 @@ func (a *AdminAPI) DeleteContact(ctx context.Context, ID string) error {
func (a *AdminAPI) AcceptInvitation(ctx context.Context, ID string) error {
err := a.invitationsAPI.AcceptInvitation(ctx, ID)
if err != nil {
msg := fmt.Sprintf("failed to accept invitation with ID: %s", ID)
msg := fmt.Sprintf("accept invitation with ID: %s", ID)
return invitations.HTTPErrorFormatter(msg, err).FormatDeleteErr()
}

Expand All @@ -125,7 +125,7 @@ func (a *AdminAPI) AcceptInvitation(ctx context.Context, ID string) error {
func (a *AdminAPI) RejectInvitation(ctx context.Context, ID string) error {
err := a.invitationsAPI.RejectInvitation(ctx, ID)
if err != nil {
msg := fmt.Sprintf("failed to reject invitation with ID: %s", ID)
msg := fmt.Sprintf("delete invitation with ID: %s", ID)
return invitations.HTTPErrorFormatter(msg, err).FormatDeleteErr()
}

Expand Down

0 comments on commit 9a82be8

Please sign in to comment.