Our user authentication implementation so far does the required functionality, however if something is wrong and an error occurs, it doesn't tell you what's wrong. So we are going to add the code to retrieve the error message from our .NET code.
The .NET code sends out a JSON object at the end of the copy operation that indicates the status of the invocation. When you are creating your own service later on, make sure that you follow the same pattern. The status consists of two values:

Create a reusable part called ExternalServiceInvocationStatus to represent the invocation status. You will use this reusable part in all your services.
Note that this is the same reusable part as referred to in the Tutorial 2, so if you have done Tutorial 2, you would have created this reusable part. You can skip to the next section.

Place the following code in the new reusable part:
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_OBJT)