Skip to content

Conversation

@JoshuaSBrown
Copy link
Collaborator

@JoshuaSBrown JoshuaSBrown commented Nov 18, 2025

Ticket

Description

How Has This Been Tested?

Artifacts (if appropriate):

Tasks

  • - A description of the PR has been provided, and a diagram included if it is a new feature.
  • - Formatter has been run
  • - CHANGELOG comment has been added
  • - Labels have been assigned to the pr
  • - A reviwer has been added
  • - A user has been assigned to work on the pr
  • - If new feature a unit test has been added

Summary by Sourcery

Bug Fixes:

  • Add res.send(result) in user_router.js to fix regression of a missing response

@JoshuaSBrown JoshuaSBrown self-assigned this Nov 18, 2025
@JoshuaSBrown JoshuaSBrown added Type: Bug Something isn't working Priority: High Highest priority Component: Database Relates to database microservice / data model labels Nov 18, 2025
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Nov 18, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR fixes a regression in the user_router Foxx API by reintroducing a missing res.send call to ensure responses are correctly returned to clients.

Sequence diagram for corrected user_router response flow

sequenceDiagram
actor Client
participant "user_router API"
participant "Database"
Client->>"user_router API": Send request
"user_router API"->>"Database": Query user data
"Database"-->>"user_router API": Return user data
"user_router API"->>Client: res.send(result)
Loading

Class diagram for user_router response handling

classDiagram
class UserRouter {
  +handleRequest(req, res)
}
UserRouter : +result
UserRouter : +res.send(result)
Loading

File-Level Changes

Change Details Files
Added missing response send after result computation
  • Inserted res.send(result) immediately after result assignment in the router callback
core/database/foxx/api/user_router.js

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@JoshuaSBrown JoshuaSBrown linked an issue Nov 18, 2025 that may be closed by this pull request
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@JoshuaSBrown JoshuaSBrown changed the title fix: user_router fix regression in missing response. [DAPS-1777] - Foxx, fix: user_router fix regression in missing response. Nov 18, 2025
@JoshuaSBrown
Copy link
Collaborator Author

Here we demonstrate that the test is able to cover the use case we encountered.

https://code.ornl.gov/dlsw/datafed/datafed/-/jobs/3671682

db3-linux-3.12.2_x86_64/usr/share/arangodb3/js/server/modules/@arangodb/foxx/router/tree.js:434:3)\n    at Tree.dispatch (/opt/arangodb3/arangodb3-linux-3.12.2_x86_64/usr/share/arangodb3/js/server/modules/@arangodb/foxx/router/tree.js:136:7)\n    at callback (/opt/arangodb3/arangodb3-linux-3.12.2_x86_64/usr/share/arangodb3/js/server/modules/@arangodb/foxx/service.js:356:35)\n    at execute (/opt/arangodb3/arangodb3-linux-3.12.2_x86_64/usr/share/arangodb3/js/server/modules/@arangodb/actions.js:1235:7)\n    at routeRequest (/opt/arangodb3/arangodb3-linux-3.12.2_x86_64/usr/share/arangodb3/js/server/modules/@arangodb/actions.js:1254:3)
Nov 18 19:01:17 ci-datafed-arangodb arangod[1115]: 2025-11-19T00:01:17.723165Z [1115-6] INFO [99d80] {general} Service exception: TypeError: Cannot create property 'off' on string ' "owner":"u/datafed89","cols":["root"],"off":0,"cnt":20'
Nov 18 19:01:17 ci-datafed-arangodb arangod[1115]: 2025-11-19T00:01:17.723615Z [1115-6] WARNING [514da] {general} Service "/api/1" encountered error 500 while handling GET [MASKED]/_db/sdms/api/1/qry/exec?client=u%2Fdatafed89&id=q%2F366115&offset=0&count=20
Nov 18 19:01:17 ci-datafed-arangodb arangod[1115]: 2025-11-19T00:01:17.723626Z [1115-6] WARNING [514da] {general} via InternalServerError: Unexpected exception: TypeError: Cannot create property 'off' on string ' "owner":"u/datafed89","cols":["root"],"off":0,"cnt":20'
Nov 18 19:01:17 ci-datafed-arangodb arangod[1115]: 2025-11-19T00:01:17.723629Z [1115-6] WARNING [514da] {general}     at SyntheticResponse.throw (/opt/arangodb3/arangodb3-linux-3.12.2_x86_64/usr/share/arangodb3/js/server/modules/@arangodb/foxx/router/response.js:337:9)
Nov 18 19:01:17 ci-datafed-arangodb arangod[1115]: 2025-11-19T00:01:17.723632Z [1115-6] WARNING [514da] {general}     at module.exports.obj.handleException (/tmp/arangodb-app.root/_db/sdms/api/1/APP/api/support.js:431:22)
Nov 18 19:01:17 ci-datafed-arangodb arangod[1115]: 2025-11-19T00:01:17.723634Z [1115-6] WARNING [514da] {general}     at Route._handler (/tmp/arangodb-app.root/_db/sdms/api/1/APP/api/query_router.js:701:19)
Nov 18 19:01:17 ci-datafed-arangodb arangod[1115]: 2025-11-19T00:01:17.723636Z [1115-6] WARNING [514da] {general}     at next (/opt/arangodb3/arangodb3-linux-3.12.2_x86_64/usr/share/arangodb3/js/server/modules/@arangodb/foxx/router/tree.js:420:15)
Nov 18 19:01:17 ci-datafed-arangodb arangod[1115]: 2025-11-19T00:01:17.723638Z [1115-6] WARNING [514da] {general}     at next (/opt/arangodb3/arangodb3-linux-3.12.2_x86_64/usr/share/arangodb3/js/server/modules/@arangodb/foxx/router/tree.js:418:7)
Nov 18 19:01:17 ci-datafed-arangodb arangod[1115]: 2025-11-19T00:01:17.723641Z [1115-6] WARNING [514da] {general}     at next (/opt/arangodb3/arangodb3-linux-3.12.2_x86_64/usr/share/arangodb3/js/server/modules/@arangodb/foxx/router/tree.js:418:7)
Nov 18 19:01:17 ci-datafed-arangodb arangod[1115]: 2025-11-19T00:01:17.723643Z [1115-6] WARNING [514da] {general}     at next (/opt/arangodb3/arangodb3-linux-3.12.2_x86_64/usr/share/arangodb3/js/server/modules/@arangodb/foxx/router/tree.js:418:7)
Nov 18 19:01:17 ci-datafed-arangodb arangod[1115]: 2025-11-19T00:01:17.723645Z [1115-6] WARNING [514da] {general}     at dispatch (/opt/arangodb3/arangodb3-linux-3.12.2_x86_64/usr/share/arangodb3/js/server/modules/@arangodb/foxx/router/tree.js:434:3)
Nov 18 19:01:17 ci-datafed-arangodb arangod[1115]: 2025-11-19T00:01:17.723647Z [1115-6] WARNING [514da] {general}     at Tree.dispatch (/opt/arangodb3/arangodb3-linux-3.12.2_x86_64/usr/share/arangodb3/js/server/modules/@arangodb/foxx/router/tree.js:136:7)
Nov 18 19:01:17 ci-datafed-arangodb arangod[1115]: 2025-11-19T00:01:17.723649Z [1115-6] WARNING [514da] {general}     at callback (/opt/arangodb3/arangodb3-linux-3.12.2_x86_64/usr/share/arangodb3/js/server/modules/@arangodb/foxx/service.js:356:35)

Now we can apply the fix and it should pass.

@JoshuaSBrown JoshuaSBrown merged commit dfb241a into staging Nov 25, 2025
14 checks passed
@JoshuaSBrown JoshuaSBrown deleted the 1777-fix-staging-missing-response-user-update-route branch November 25, 2025 11:55
JoshuaSBrown added a commit that referenced this pull request Nov 25, 2025
…se. (#1778)

[DAPS-1786] - Web tests, refactor: add test for hitting password reset. (#1787)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Database Relates to database microservice / data model Priority: High Highest priority Type: Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] - Foxx, error in updating user password

3 participants