Skip to content

Commit

Permalink
Fixes #120 - changed type from error response to service error
Browse files Browse the repository at this point in the history
  • Loading branch information
TebaleloS committed Mar 26, 2024
1 parent 94703b8 commit 3b05824
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
package za.co.absa.atum.server.api.controller

import za.co.absa.atum.model.dto.{AdditionalDataSubmitDTO, AtumContextDTO, PartitioningSubmitDTO}
import za.co.absa.atum.server.api.exception.ServiceError
import za.co.absa.atum.server.model.ErrorResponse
import zio.IO
import zio.macros.accessible

@accessible
trait PartitioningController {
def createPartitioningIfNotExists(partitioning: PartitioningSubmitDTO): IO[ErrorResponse, AtumContextDTO]
def createPartitioningIfNotExists(partitioning: PartitioningSubmitDTO): IO[ServiceError, AtumContextDTO]
def createOrUpdateAdditionalData(additionalData: AdditionalDataSubmitDTO): IO[ErrorResponse, AdditionalDataSubmitDTO]
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import zio._
class PartitioningControllerImpl(partitioningService: PartitioningService)
extends PartitioningController with BaseController {

override def createPartitioningIfNotExists(partitioning: PartitioningSubmitDTO): IO[ErrorResponse, AtumContextDTO] = {
override def createPartitioningIfNotExists(partitioning: PartitioningSubmitDTO): IO[ServiceError, AtumContextDTO] = {
partitioningService.returnAtumContext(partitioning)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package za.co.absa.atum.server.api.service
import za.co.absa.atum.model.dto.{AdditionalDataDTO, AdditionalDataSubmitDTO, AtumContextDTO, MeasureDTO, PartitioningSubmitDTO}
import za.co.absa.atum.server.api.exception.ServiceError
import za.co.absa.atum.server.api.repository.PartitioningRepository
import za.co.absa.atum.server.model.ErrorResponse
import za.co.absa.fadb.exceptions.StatusException
import zio._

Expand Down

0 comments on commit 3b05824

Please sign in to comment.