Giter VIP home page Giter VIP logo

Comments (8)

srinivasankavitha avatar srinivasankavitha commented on August 16, 2024

Thanks for flagging this. We'll fix this behavior in the next release or two .

from dgs-framework.

mrvaruntandon avatar mrvaruntandon commented on August 16, 2024

@Meemaw, could you please the steps to reproduce this issue?

from dgs-framework.

mrvaruntandon avatar mrvaruntandon commented on August 16, 2024

@srinivasankavitha is this issue open for contribution?

from dgs-framework.

srinivasankavitha avatar srinivasankavitha commented on August 16, 2024

Yes, this has not been addressed yet.

from dgs-framework.

mrvaruntandon avatar mrvaruntandon commented on August 16, 2024

Hello @srinivasankavitha,

I tried to create a project to understand this issue.

I created a query returning a custom scaler. While returning a value for the query, the serialize() method of Coercing interface from my custom implementation was invoked. When I passed a value that would throw CoercingSerializeException. The response for such a query was:

{
  "errors": [
    {
      "message": "Can't serialize value (/ip) : Invalid IPv4 address",
      "path": [
        "ip"
      ],
      "extensions": {
        "errorType": "UNAVAILABLE",
        "errorDetail": "SERVICE_ERROR"
      }
    }
  ],
  "data": {
    "ip": null
  }
}

I did not see any logs in my console telling me that CoercingSerializeException has happened.

Could you tell me if the above description successfully reproduces this issue?

Also, could share what should be the expected response here and how is it related to TypedGraphQLError class?

from dgs-framework.

mrvaruntandon avatar mrvaruntandon commented on August 16, 2024

@Meemaw, could you please the steps to reproduce this issue?

@Meemaw could you please check the way I have tried to reproduce this issue? Also, could you tell me what would be the expected behaviour here?

from dgs-framework.

srinivasankavitha avatar srinivasankavitha commented on August 16, 2024

@mrvaruntandon - I believe you have the correct repro of the issue. The ask is to fill out the errorType/errorDetail to reflect something closer to the exception rather than our generic UNAVAILABLE error. The logic to handle translating graphql-java error to a TypedGraphQlError is here: https://github.com/Netflix/dgs-framework/blob/master/graphql-dgs/src/main/kotlin/com/netflix/graphql/dgs/internal/GraphQLJavaErrorInstrumentation.kt#L29, so we just need to handle the CoercingSerializeException here.

from dgs-framework.

mrvaruntandon avatar mrvaruntandon commented on August 16, 2024

Hey @srinivasankavitha,

Thank you for your guidance! I have tried to resolve this issue via #1970. Could you please take a look and provide your comments.

Thanks in advance!

from dgs-framework.

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.