Error response enhancements, CoreID auth client backend

This commit is contained in:
2022-03-29 01:14:46 -05:00
parent a039b1ff25
commit 8f08b94f74
31 changed files with 736 additions and 52 deletions

View File

@@ -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()