Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(node): remove legacy BE files #832

Merged
merged 8 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ package io.iohk.atala.prism.auth

import derevo.derive
import io.grpc.Status
import io.iohk.atala.prism.errors.{PrismError, PrismServerError}
import io.iohk.atala.prism.errors.PrismError
import tofu.logging.derivation.loggable
import io.iohk.atala.prism.logging.GeneralLoggableInstances._

package object errors {
@derive(loggable)
Expand All @@ -22,20 +21,6 @@ package object errors {
}
}

case object CanonicalSuffixMatchStateError extends AuthError {
override def toStatus: Status = {
Status.UNAUTHENTICATED.withDescription(
"PrismDid canonical suffix does not match the state content"
)
}
}

case object InvalidAtalaOperationError extends AuthError {
override def toStatus: Status = {
Status.UNAUTHENTICATED.withDescription("Invalid encoded Atala operation")
}
}

case object NoCreateDidOperationError extends AuthError {
override def toStatus: Status = {
Status.UNAUTHENTICATED.withDescription(
Expand All @@ -44,25 +29,8 @@ package object errors {
}
}

final case class UnsupportedAuthMethod() extends AuthError {
override def toStatus: Status = {
Status.UNAUTHENTICATED.withDescription("Unsupported auth method")
}
}

final case class UnexpectedError(status: Status) extends AuthError {
override def toStatus: Status = status
}

final case class InvalidRequest(reason: String) extends AuthError {
def toStatus: Status = Status.INVALID_ARGUMENT.withDescription(reason)
}

final case class InternalServerError(cause: Throwable) extends AuthError with PrismServerError {
override def toStatus: Status = {
Status.INTERNAL.withDescription(
s"Internal server error, cause: ${cause.getMessage}. Please contact administrator."
)
}
}
}

This file was deleted.

This file was deleted.

Loading
Loading