Title: Exclude wp-admin issues
Last modified: January 12, 2022

---

# Exclude wp-admin issues

 *  Resolved [karmeljuk](https://wordpress.org/support/users/karmeljuk/)
 * (@karmeljuk)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/exclude-wp-admin-issues/)
 * Is it possible to exclude wp-admin issues? Here is an example
 *     ```
       SyntaxError ?(wp-admin/edit)
       Regression
       Unhandled
       Invalid or unexpected token
   
       /wp-admin/edit.php at line 2751:10
   
       {
       from: /wp-admin/edit.php?post_type=shop_order&paged=2, 
       to: /wp-admin/edit.php?post_type=shop_order&paged=2
       }
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fexclude-wp-admin-issues%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [stayallive](https://wordpress.org/support/users/stayallive/)
 * (@stayallive)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/exclude-wp-admin-issues/#post-15247760)
 * Hi!
 * I don’t have a snippet for you to just copy and paste over unfortunately but 
   we do have documentation on how to exclude errors from specific parts, this can
   be easily adjusted to exclude errors from the `/wp-admin/`.
 * > [https://github.com/stayallive/wp-sentry#capturing-errors-only-from-certain-theme-andor-plugin](https://github.com/stayallive/wp-sentry#capturing-errors-only-from-certain-theme-andor-plugin)
 * Take a look to see if you can use that to do what you want!
 *  Thread Starter [karmeljuk](https://wordpress.org/support/users/karmeljuk/)
 * (@karmeljuk)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/exclude-wp-admin-issues/#post-15275664)
 * > `Hi!
   > I don’t have a snippet for you to just copy and paste over unfortunately but
   > we do have documentation on how to exclude errors from specific parts, this
   > can be easily adjusted to exclude errors from the /wp-admin/.
   > > [https://github.com/stayallive/wp-sentry#capturing-errors-only-from-certain-theme-andor-plugin](https://github.com/stayallive/wp-sentry#capturing-errors-only-from-certain-theme-andor-plugin)
   > Take a look to see if you can use that to do what you want!`
 * Hello Alex
    Thanks for your reply. I already use this filter, but I’m not sure
   how to modify it for wp-admin. Could you please help me?
 *  Plugin Author [stayallive](https://wordpress.org/support/users/stayallive/)
 * (@stayallive)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/exclude-wp-admin-issues/#post-15279258)
 * I think replacing this in the snippet from the readme:
 *     ```
       if ( $strContainsHelper( $frame->getFile(), 'themes/THEME_NAME' )
           || $strContainsHelper( $frame->getFile(), 'plugins/PLUGIN_NAME' )
       ) {
       ```
   
 * with:
 * `if ( $strContainsHelper( $frame->getFile(), 'wp-admin/' ) ) {`
 * might already work, but do be mindful that this excludes any error that comes
   through `wp-admin` so also when your code is called from `wp-admin` it basically
   looks if the frames (lines of the stacktrace) contains a file from `wp-admin`
   and then doesn’t report it. I might be better to simply mark the exceptions you
   see from the wp-admin as ignored in the Sentry interface or be more specific 
   about which you are filtering because this might filter out too many exceptions.
 * So use at your own risk! 🙂
    -  This reply was modified 4 years, 4 months ago by [stayallive](https://wordpress.org/support/users/stayallive/).
      Reason: formatting

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Exclude wp-admin issues’ is closed to new replies.

 * ![](https://ps.w.org/wp-sentry-integration/assets/icon-256x256.jpg?rev=1772463)
 * [Sentry for WordPress](https://wordpress.org/plugins/wp-sentry-integration/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-sentry-integration/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-sentry-integration/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-sentry-integration/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-sentry-integration/reviews/)

## Tags

 * [wp-admin](https://wordpress.org/support/topic-tag/wp-admin/)

 * 3 replies
 * 2 participants
 * Last reply from: [stayallive](https://wordpress.org/support/users/stayallive/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/exclude-wp-admin-issues/#post-15279258)
 * Status: resolved