Improve error message

This commit is contained in:
syuilo 2018-07-01 13:44:24 +09:00
parent ee6a52dc30
commit 639aa8197a

View File

@ -52,7 +52,7 @@ export async function createPerson(value: any, resolver?: Resolver): Promise<IUs
} }
if (object.type != 'Person' && object.type != 'Service') { if (object.type != 'Person' && object.type != 'Service') {
throw new Error('invalid person: object is not a person or service'); throw new Error(`invalid person: object is not a person or service '${object.type}'`);
} }
if (typeof object.preferredUsername !== 'string') { if (typeof object.preferredUsername !== 'string') {