There are lots of articles in the DC and in the documentation about error handling and I have a few of them bookmarked, but for the most part I always throw $$$GeneralError (5001).  Using this tool and asking about when I should or shouldn't use this helped me learn that there are more buckets to throw custom errors under.  Plus the link to the source article gives even more info on registering custom error codes (I've never seen this article, so glad this tool pointed me to it).  

https://community.intersystems.com/ask-dc-ai?question_id=132835

I appreciated this video as yet another resource for learning. Please do more!

The use case for the namespaces presented here seemed fringe to me.  If you need to simulate an FTP server, why not spin up a small container that does so.  Or are you talking about one HealthShare system to another HealthShare system?  

The common use for namespaces I've seen is separating dev, test, qa and production environments.  

I would personally like to understand better using namespaces to separate code versus data. Maybe this gets into the video's early point that one must understand the definitions. I guess I was taught to think of a namespace as a database, but when you see the following setting comes up in installation manifests it starts to get confusing because you have a code database and a data database in the same namespace and in this example I use the namespace as as the database name.  Maybe I'm just not understanding it at all!

<Namespace Name="${NAMESPACE}" Code="${NAMESPACE}" Data="${NAMESPACE}" Create="yes" Ensemble="1">

Thanks for sharing this video!

I know this isn't helpful but it knocks one solution OFF the list.  I thought you could use Outputs in your method signature but this isn't supported with Python methods:

While passing arguments by reference is a feature of ObjectScript methods, there is no equivalent way to pass arguments by reference to a method written in Python. The ByRef and Output keywords in the signature of an ObjectScript method are conventions used to indicate to the user that the method expects that an argument is to be passed by reference. In fact, ByRef and Output have no actual function and are ignored by the compiler. Adding ByRef or Output to the signature of a method written in Python results in a compiler error.

https://docs.intersystems.com/iris20241/csp/docbook/DocBook.UI.Page.cls?...

From your example, I think you'd want to fire up the Python shell from the COS command line and import the iris package and call your function with the normal multiple return value syntax.  If you import the iris package you can then save the output to a global or pass it to another COS function that you need it for.

Keep this page bookmarked at all times and reference often, even if you think you know a command: https://docs.intersystems.com/iris20241/csp/docbook/DocBook.UI.Page.cls?...

If you can get to know all these commands intimately, you'll have a deep understand of library classes and methods and also INT and MAC code. 

Thanks, @Ron Sweeney 

Yes, I did put the token in the debugger and confirm only once scope is in the token and made sure that I copied and pasted that in the ValidateJWT() method so I didn't fat finger.  So the scope is indeed there.  My workaround is to not try to validate the scope within the library methods and just pull out the scope from the body and validate in a for loop.
 

@Alex Baumberg are you running IRIS on a Docker container or is it installed locally on your machine?  Check out this section: https://intersystems-community.github.io/vscode-objectscript/configurati...

Either way the setup should be quite the same.  Can someone confirm for client-side editing if the local source code folder needs a bind-mount to the Docker container and to to where it should be mapped? 

You might try using this to get started as another option: https://github.com/intersystems-community/objectscript-docker-template

For what it's worth, I'm a few years into this and I'm still constantly confused :)

@Gertjan Klein thanks for your help and sorry for my delayed response.

I did not realize the message body is not set if there’s an error.  This explains a lot.  I was previously doing a try/catch and trying to set the %Status error text into the StringContainter response and frustrated that it wasn’t there.  I think I’m trying to overdo what Ensemble already does for free.  I also think I need to keep a response a response and keep errors as errors and not try to combine them. 

But thank you for your method here to get the header ID.  Since as you say it's not trivial, it makes me think it's unconventional and again I'm trying to use the system in ways it wasn't really designed for.  However, it's handy to understand how this works.  Thanks for helping me think through this!

Thank you!

sortbox - If present, the Search Page displays a set of radio buttons that allows the user to choose how to sort the results.

I wouldn't have immediately thought that would solve it but it makes sense along with your explanation.

Out of curiosity, how would you override that write statement in %CSP.Lookup?  Isn't that generated code which one wouldn't want to touch?

I would like to know a little more about this.

I was just working on something where my business process put together a custom object based on a file from the record mapper.  The object is simply saved to the database so just to put a bow on it we send a request to a "FinishedOperation" business operation which doesn't do anything.  The request is sent async and the request object is the instance of the custom object was created/updated.  

This request object has a few properties that are object properties and one is XML enabled the other is not.  They both show up in the body of the message trace there's nothing in the content tab of the message trace.

How come they show up when they aren't XML enabled? What am I not understanding in terms of the difference between the body and the contents?

Thanks!