@@ -308,20 +308,24 @@ SET @mefe_unit_id = '%s';
308308SET @creation_datetime = '%s';
309309SET @is_created_by_me = %d;
310310SET @mefe_api_error_message = '%s';
311+ SET @mefe_api_request_id = '%s';
311312CALL ut_creation_unit_mefe_api_reply;`
312313 filledSQL = fmt .Sprintf (templateSQL ,
313314 act .UnitCreationRequestID ,
314315 parsedResponse .ID ,
315316 parsedResponse .Timestamp .Format (sqlTimeLayout ),
316317 isCreatedByMe ,
317- errorMessage )
318+ errorMessage ,
319+ act .MEFERequestID ,
320+ )
318321 case "CREATE_USER" :
319322 templateSQL := `SET @user_creation_request_id = %d;
320323SET @mefe_user_id = '%s';
321324SET @creation_datetime = '%s';
322325SET @is_created_by_me = %d;
323326SET @mefe_api_error_message = '%s';
324327SET @mefe_user_api_key = '%s';
328+ SET @mefe_api_request_id = '%s';
325329CALL ut_creation_user_mefe_api_reply;`
326330 filledSQL = fmt .Sprintf (templateSQL ,
327331 act .UserCreationRequestID ,
@@ -330,31 +334,36 @@ CALL ut_creation_user_mefe_api_reply;`
330334 isCreatedByMe ,
331335 errorMessage ,
332336 parsedResponse .MefeAPIkey ,
337+ act .MEFERequestID ,
333338 )
334339 case "ASSIGN_ROLE" :
335340 templateSQL := `SET @id_map_user_unit_permissions = %d;
336341SET @creation_datetime = '%s';
337342SET @mefe_api_error_message = '%s';
343+ SET @mefe_api_request_id = '%s';
338344CALL ut_creation_user_role_association_mefe_api_reply;`
339- filledSQL = fmt .Sprintf (templateSQL , act .IDmapUserUnitPermissions , parsedResponse .Timestamp .Format (sqlTimeLayout ), errorMessage )
345+ filledSQL = fmt .Sprintf (templateSQL , act .IDmapUserUnitPermissions , parsedResponse .Timestamp .Format (sqlTimeLayout ), errorMessage , act . MEFERequestID )
340346 case "EDIT_USER" :
341347 templateSQL := `SET @update_user_request_id = %d;
342348SET @updated_datetime = '%s';
343349SET @mefe_api_error_message = '%s';
350+ SET @mefe_api_request_id = '%s';
344351CALL ut_update_user_mefe_api_reply;`
345- filledSQL = fmt .Sprintf (templateSQL , act .UpdateUserRequestID , parsedResponse .Timestamp .Format (sqlTimeLayout ), errorMessage )
352+ filledSQL = fmt .Sprintf (templateSQL , act .UpdateUserRequestID , parsedResponse .Timestamp .Format (sqlTimeLayout ), errorMessage , act . MEFERequestID )
346353 case "EDIT_UNIT" :
347354 templateSQL := `SET @update_unit_request_id = %d;
348355SET @updated_datetime = '%s';
349356SET @mefe_api_error_message = '%s';
357+ SET @mefe_api_request_id = '%s';
350358CALL ut_update_unit_mefe_api_reply;`
351- filledSQL = fmt .Sprintf (templateSQL , act .UpdateUnitRequestID , parsedResponse .Timestamp .Format (sqlTimeLayout ), errorMessage )
359+ filledSQL = fmt .Sprintf (templateSQL , act .UpdateUnitRequestID , parsedResponse .Timestamp .Format (sqlTimeLayout ), errorMessage , act . MEFERequestID )
352360 case "DEASSIGN_ROLE" :
353361 templateSQL := `SET @remove_user_from_unit_request_id = %d;
354362SET @updated_datetime = '%s';
355363SET @mefe_api_error_message = '%s';
364+ SET @mefe_api_request_id = '%s';
356365CALL ut_remove_user_role_association_mefe_api_reply;`
357- filledSQL = fmt .Sprintf (templateSQL , act .RemoveUserFromUnitRequestID , parsedResponse .Timestamp .Format (sqlTimeLayout ), errorMessage )
366+ filledSQL = fmt .Sprintf (templateSQL , act .RemoveUserFromUnitRequestID , parsedResponse .Timestamp .Format (sqlTimeLayout ), errorMessage , act . MEFERequestID )
358367 default :
359368 return fmt .Errorf ("Unknown type: %s, so no SQL template can be inferred" , act .Type )
360369 }
0 commit comments