Response Structure

All gateway responses implements common interface "BaseResponseDto", having the following fields:

Boolean success

ErrorDto error

Where ErrorDto is a recursive object, containing the following fields:

String target

ErrorCodes code

String message

List<ErrorDto> details

When the success field is false, there will be no overriding Dto fields, only the error field of the BaseResponseDto:

success = false

error = {…}

When the success field is true, the response is overridden by one of the concrete response Dto's and will include its fields also. For instance, a CreateResponseDto would look like this:

success = true

error = null

createdEntityId = "…"

Where the success and error fields are part of the base response class, and the createdEntityId field is added by the overriding Dto (CreateResponseDto).


Last update: 2024-09-24