Skip to content
Merged
Changes from all 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
12 changes: 10 additions & 2 deletions ocp/rpc/currency/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,11 @@ func (s *currencyServer) GetHistoricalMintData(ctx context.Context, req *currenc
endTime,
interval,
)
if err != nil {
if err == currency.ErrNotFound {
return &currencypb.GetHistoricalMintDataResponse{
Result: currencypb.GetHistoricalMintDataResponse_MISSING_DATA,
}, nil
} else if err != nil {
log.With(zap.Error(err)).Warn("failed to load currency reserve history")
return nil, status.Error(codes.Internal, "")
}
Expand All @@ -275,7 +279,11 @@ func (s *currencyServer) GetHistoricalMintData(ctx context.Context, req *currenc
endTime,
interval,
)
if err != nil {
if err == currency.ErrNotFound {
return &currencypb.GetHistoricalMintDataResponse{
Result: currencypb.GetHistoricalMintDataResponse_MISSING_DATA,
}, nil
} else if err != nil {
log.With(zap.Error(err)).Warn("failed to load exchange rate history")
return nil, status.Error(codes.Internal, "")
}
Expand Down
Loading