Skip to content
Discussion options

You must be logged in to vote

You can implement the report method within the global exception handler and disable it when in testing environment.

import Application from '@ioc:Adonis/Core/Application'

public async report(error: any, ctx: HttpContextContract) {
  if (process.env.NODE_ENV === 'test') {
    return
  }

  return super.report(error, ctx)
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SkifAlef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants