I assume there could be different types of errors that can be caught if getCurrentCart() fails, so i wanted a way to specifically know its an error because of an empty first time visitor cart. I don’t have issues with checking for an empty cart once a product is added, since the cart stays for the session. This is just for the absolute first time a visitor checking his cart. I was looking for some kind of object with an error code or number possibly to clearly show its an empty cart as opposed to a message like “Cart with person identity not found” because , if i checked it based on this string and it changed in future without my knowledge it could lead to issues. The error object doesn’t contain much else. Ill have a look at the roles options otherwise looks like this is the only to go for now. Thanks anyways
details:
[[Prototype]]: Object
errorGroup: "User"
message: "Cart with person identity db705ecd-20d9-43ff-b632-1f6e99ca0b6d not found"
[[Prototype]]: Object