diff --git a/app/v1/controllers/SubmitReturnController.scala b/app/v1/controllers/SubmitReturnController.scala index 8ac9c6da..a966ad0b 100644 --- a/app/v1/controllers/SubmitReturnController.scala +++ b/app/v1/controllers/SubmitReturnController.scala @@ -88,14 +88,16 @@ class SubmitReturnController @Inject()(val authService: EnrolmentsAuthService, Created(Json.toJson(serviceResponse.responseData)) .withApiHeaders(serviceResponse.correlationId, - "Receipt-ID" -> nrsId, + "Receipt-ID" -> correlationId, "Receipt-Timestamp" -> submissionTimestamp.format(DateUtils.isoInstantDatePattern), "Receipt-Signature" -> NrsResponse.deprecatedString) } result.leftMap { errorWrapper => val resCorrelationId: String = errorWrapper.correlationId - val leftResult = errorResult(errorWrapper).withApiHeaders(resCorrelationId) + val leftResult = errorResult(errorWrapper).withApiHeaders( + resCorrelationId, + "Receipt-ID" -> correlationId) warnLog(ControllerError(endpointLogContext ,vrn, request, leftResult.header.status, errorWrapper.error.message, resCorrelationId)) auditService.auditEvent(AuditEvents.auditSubmit(resCorrelationId,