Coder Social home page Coder Social logo

Comments (8)

johanandren avatar johanandren commented on July 21, 2024

I'd expect it is the client response whenever any server does not respond or can't be resolved (UNAVAILABLE - can't be reached). Since the server could not be reached the response does not contain a grpc-status header, logic for "recovering" the response is here

from akka-grpc.

GreyPlane avatar GreyPlane commented on July 21, 2024

@johanandren during implements http transcoding for akka grpc, I was found the possible reason, and I think it's a bug or design flaw.

AkkaHttpClient always check if "grpc-status" exists and equal to "0".

NettyClient seems doesn't check it.

Also I manually inspect the trailer headers, it doesn't contain grpc-status=0 for unknown reason in both backend, since according to the document, there should be explicit grpc-status for successful request.

from akka-grpc.

GreyPlane avatar GreyPlane commented on July 21, 2024

Since the server could not be reached the response does not contain a grpc-status header

In my case, there is no way that server cannot be reached since after I changed validation logic it just works fine.

I think I can provide reproduction if needed.

from akka-grpc.

johanandren avatar johanandren commented on July 21, 2024

If there is no grpc status in the response, it seems the error is correct?

from akka-grpc.

johanandren avatar johanandren commented on July 21, 2024

So definitely interesting to know if/when the Akka gRPC server emits such a response.

from akka-grpc.

GreyPlane avatar GreyPlane commented on July 21, 2024

uh, I think I've missed something, after experiments with client, it's works fine with AkkaHttpClient though I do find that NettyClient's onClose callback doesn't contains any trailer.

sry for misleading, I will continue to investigate when to put TrailerOK into response

from akka-grpc.

GreyPlane avatar GreyPlane commented on July 21, 2024

I found the reason why, since I was using generated grpcHandler directly(without network), HttpEntity is Strict instead of Chunked, so codes inside responseToSource doesn't retrieve trailer from attributes, so it's lost.

trailerPromise.success(immutable.Seq.empty)

I think it's OK to change it to retrieve trailer from attributes.

from akka-grpc.

jtjeferreira avatar jtjeferreira commented on July 21, 2024

I implemented the suggested fix in #1906

from akka-grpc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.