Skip to content

Clean up code for optimal logging integration #1

@tachyonlabs

Description

@tachyonlabs

Many functions have a lot of return points due to having many error checks -- does the database exist, the table exist, is the token string empty, does the user exist, is the token already registered to a different user, etc. etc. -- so figure out good places to log. A function calling that function could do it, but there might be additional error checks in the calling function as well.

There's also the issue that log_action() is expecting either a wp_error or a string, so that could make it hard to add additional details to a wp_error for example whether associating a token with a user had happened via a WordPress dashboard submenu page or the API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions