I am using AppSync > Lambda resolver (using golang) > Dynamodb
I've looked everyone for more information on error handling with them. To start with, it appears as if AppSync doesn't rely on status codes coming back from the lambda resolver to indicate if there was an issue. Instead, we return an error in the lambda function
i.e. func(event CustomEventStruct) (map[string]any, error)
Now, if I return an error in this, it looks like I'm only able to control the message. AppSync also appears to have an "errorType" at the minimum.
Is there a way to control the error type, potentially a status code (though I doubt it from what I've read) and the errorMessage?