Error response enhancements, CoreID auth client backend
This commit is contained in:
@@ -451,14 +451,19 @@ export class Container {
|
||||
|
||||
this.checkForMakeCycles()
|
||||
|
||||
if ( this.hasKey(target) ) {
|
||||
const realized = this.resolveAndCreate(target, ...parameters)
|
||||
try {
|
||||
if (this.hasKey(target)) {
|
||||
const realized = this.resolveAndCreate(target, ...parameters)
|
||||
Container.makeStack.pop()
|
||||
return realized
|
||||
} else if (typeof target !== 'string' && isInstantiable(target)) {
|
||||
const realized = this.produceFactory(new Factory(target), parameters)
|
||||
Container.makeStack.pop()
|
||||
return realized
|
||||
}
|
||||
} catch (e: unknown) {
|
||||
Container.makeStack.pop()
|
||||
return realized
|
||||
} else if ( typeof target !== 'string' && isInstantiable(target) ) {
|
||||
const realized = this.produceFactory(new Factory(target), parameters)
|
||||
Container.makeStack.pop()
|
||||
return realized
|
||||
throw e
|
||||
}
|
||||
|
||||
Container.makeStack.pop()
|
||||
|
||||
Reference in New Issue
Block a user