Line data Source code
1 : // Package auth contains auth-usecase-specific thin adapters around shared errors.
2 : // Keep this file only if you want to minimize diffs in existing call sites.
3 : package auth
4 :
5 : import (
6 : ucshared "resume/internal/usecase/shared"
7 : )
8 :
9 : // ErrInvalidInput legacy alias preserved for compatibility.
10 : // Prefer using ucshared.ErrUnprocessable (422) or ucshared.ErrBadRequest (400) explicitly.
11 : var ErrInvalidInput = ucshared.ErrUnprocessable
12 :
13 : // mapInfraToUCError delegates to the shared mapper.
14 : // Existing call sites in auth usecase can remain unchanged.
15 0 : func mapInfraToUCError(err error) error {
16 0 : if err == nil {
17 0 : return nil
18 0 : }
19 0 : return ucshared.MapInfraError(err)
20 : }
|