Skip to content

fixed Internal server error when repositoryID is configured incorrectly#145

Merged
deepikaSingh2711 merged 10 commits intodevelopfrom
bugFixRepositoryID
Jul 8, 2025
Merged

fixed Internal server error when repositoryID is configured incorrectly#145
deepikaSingh2711 merged 10 commits intodevelopfrom
bugFixRepositoryID

Conversation

@deepikaSingh2711
Copy link
Copy Markdown
Collaborator

@deepikaSingh2711 deepikaSingh2711 commented Jun 30, 2025

Describe your changes

Updated error handling in the getRepositoryInfo method of the Node.js plugin.
Previously, if the repository was configured incorrectly (e.g., repo not found), the API would return a generic Internal Server Error

Before fix
Screenshot 2025-06-24 at 4 38 12 PM (2)

After fix
Screenshot 2025-06-27 at 5 35 54 PM

After Fix in Multitenancy Application

Screenshot 2025-07-02 at 4 12 02 PM

Any documentation

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist before requesting a review

  • I have tested the functionality on my cloud environment.
  • I have provided sufficient automated/ unit tests for the code.
  • I have increased or maintained the test coverage.
  • I have ran integration tests on my cloud environment.
  • I have validated blackduck portal for any vulnerability after my commit.

Upload Screenshots/lists of the scenarios tested

  • I have Uploaded Screenshots or added lists of the scenarios tested in description

Comment thread lib/handler/index.js Outdated
const response = await axios.get(getRepoInfoUrl, config);
return response;
} catch (error) {
if(error.response?.status===404){
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add one more check if error.respomse.staus ==500 then through error which is coming from DI

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added check to handle 500 Internal Server Error gracefully by rejecting the request with the error message from the response

Comment thread lib/handler/index.js Outdated
const response = await axios.get(getRepoInfoUrl, config);
return response;
} catch (error) {
if(error.response?.status===404){
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please correct the indentation as if(error.response?.status === 404){

@deepikaSingh2711 deepikaSingh2711 merged commit 6a3ac3b into develop Jul 8, 2025
8 checks passed
@deepikaSingh2711 deepikaSingh2711 deleted the bugFixRepositoryID branch July 8, 2025 08:07
Juergen-Goebl-msggroup pushed a commit to Andreas-Meindl-msggroup/sdm that referenced this pull request Apr 14, 2026
fixed Internal server error when repositoryID is configured incorrectly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants