Coder Social home page Coder Social logo

Comments (2)

dosubot avatar dosubot commented on June 16, 2024 2

The issue you're encountering with the GET endpoint /plugins/jira/connections/{connectionId}/scope-configs/{id} returning a 400 error with the message "missing path variable scopeConfigId" is due to a misinterpretation of the path variable. The correct path variable should be {id}, not {scopeConfigId}.

Steps to Resolve

  1. Ensure Correct Path Variable: Make sure that the request URL uses {id} as the path variable, not {scopeConfigId}. The correct URL should be:

    /plugins/jira/connections/{connectionId}/scope-configs/{id}
    
  2. Check for Misconfiguration or Bug: If the error message still mentions "missing path variable scopeConfigId", it might be due to a misconfiguration or a bug in the error handling logic. The extractConfigParam function is responsible for extracting and validating the connectionId and id parameters from the path variables. If these parameters are invalid, the function returns an error.

  3. Verify Endpoint Configuration: Ensure that the endpoint is correctly configured in the routing setup. The route should be defined as follows:

    // GetScopeConfig return one scope config
    // @Router /plugins/jira/connections/{connectionId}/scope-configs/{id} [GET]
    func GetScopeConfig(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error) {
        return dsHelper.ScopeConfigApi.GetDetail(input)
    }

Additional Information

  • Unit Tests: There are unit tests for the GetScopeConfig endpoint, and they pass successfully. The relevant test is TestCreateScopeConfig, which includes a call to GetScopeConfig to verify the created scope configuration.

  • Logging and Debugging: Ensure that logging is enabled to capture more detailed information about the error. Adjust the LOGGING_LEVEL and LOGGING_DIR settings in the configuration file to capture detailed logs.

If the issue persists, it might be helpful to review the middleware or routing configurations that could be affecting the path variable resolution. Additionally, checking for any recent changes or commits in the repository that might have introduced this issue could provide further insights.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

from incubator-devlake.

klesh avatar klesh commented on June 16, 2024

Fixed by #7498

from incubator-devlake.

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.