error
Logs an error message with optional metadata.
Parameters
message
The error message to be logged
metadata
An array of Metadata objects containing additional information (optional)
This function is used to log an error with optional metadata.
Parameters
error
The error to be logged.
metadata
An array of metadata objects to be included in the log message. Defaults to an empty array if not provided.