77* file that was distributed with this source code.
88*/
99
10- import { iocMethods } from '../helpers'
1110import { useReturnValue } from './useReturnValue'
1211import { ErrorHandlerNode , HttpContextContract } from '../contracts'
1312
@@ -37,8 +36,8 @@ export async function finalErrorHandler<Context extends HttpContextContract> (
3736 * Otherwise resolve the IoC container binding and call `handle` method
3837 * on it. The `handle` must always exist.
3938 */
40- const errorHandlerInstance = global [ iocMethods . make ] ( errorHandler )
41- const returnValue = await global [ iocMethods . call ] ( errorHandlerInstance , 'handle' , [ error , ctx ] )
39+ const errorHandlerInstance = global [ Symbol . for ( 'ioc. make' ) ] ( errorHandler )
40+ const returnValue = await global [ Symbol . for ( 'ioc. call' ) ] ( errorHandlerInstance , 'handle' , [ error , ctx ] )
4241 if ( useReturnValue ( returnValue , ctx ) ) {
4342 ctx . response . send ( returnValue )
4443 }
@@ -48,6 +47,6 @@ export async function finalErrorHandler<Context extends HttpContextContract> (
4847 * attempt to make an HTTP response
4948 */
5049 if ( typeof ( errorHandlerInstance . report ) === 'function' ) {
51- await global [ iocMethods . call ] ( errorHandlerInstance , 'report' , [ error , ctx ] )
50+ await global [ Symbol . for ( 'ioc. call' ) ] ( errorHandlerInstance , 'report' , [ error , ctx ] )
5251 }
5352}
0 commit comments