Add suggestion for missing schema for validator error
This commit is contained in:
@@ -107,6 +107,8 @@ ${Object.keys(context).map(key => ` - ${key} : ${JSON.stringify(context[key])
|
||||
protected getSuggestion(): string {
|
||||
if ( this.thrownError.message.startsWith('No such dependency is registered with this container: class SecurityContext') ) {
|
||||
return 'It looks like this route relies on the security framework. Is the route you are accessing inside a middleware (e.g. SessionAuthMiddleware)?'
|
||||
} else if ( this.thrownError.message.startsWith('Unable to resolve schema for validator') ) {
|
||||
return 'Make sure the directory in which the interface file is located is listed in extollo.cc.zodify in package.json, and that it ends with the proper .type.ts suffix.'
|
||||
}
|
||||
|
||||
return ''
|
||||
|
||||
Reference in New Issue
Block a user