comment.create() checks for the existence of ticketId and userId, but it doesn't check for the validity of provided values. The database will reject invalid values due to a foreign key error. These errors should be detected and turned into custom errors with proper codes.
comment.create()
checks for the existence ofticketId
anduserId
, but it doesn't check for the validity of provided values. The database will reject invalid values due to a foreign key error. These errors should be detected and turned into custom errors with proper codes.