I think MosaicRestrictionTransactionService can't create restriction at the first time.
getGlobalRestrictionEntry can't return undefined because JSON.parse(err.message) is failed.
err.message is "No global restriction found for (mosaicId)"
https://github.com/nemtech/symbol-sdk-typescript-javascript/blob/63e8a82c9af94c1f4f09da13c78172f1da9b07cd/src/service/MosaicRestrictionTransactionService.ts#L189
It's not JSON format.