Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Conversation

dsellarsnr
Copy link
Contributor

Idea here is that post /POST for a code error is idempotent and won't create a duplicate toplevel post for a error discussion based on the NR errorGuid. The toplevel post stores the errorGuid to link the NR error with the conversation.

throw this.errorHandler.error('parameterRequired', { reason: 'parentPostId is required for Grok reinitialization' });
}

const post = await this.data.posts.getById(this.request.body.parentPostId);
const codeError = await this.data.codeErrors.getById(post.get('codeErrorId'));
this.log("PostPostRequest - handleResponse - reinitializeGrok - looking up codeError");
const codeError = await this.data.codeErrors.getById(post.get('codeErrorId')); // TODO not in errorGuid mode
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure i understand the TODO here


// When we force a reinitialization on a Code Error with Grok, we need to return
// the original Parent Post and the Code Error associated with it. The client
// doesn't know how to handle the response without them.
this.responseData.post = post.getSanitizedObject({ request: this.request });
this.responseData.codeError = codeError.getSanitizedObject({ request: this.request });
this.responseData.codeError = codeError.getSanitizedObject({ request: this.request }); // TODO not in errorGuid mode
Copy link
Contributor

Choose a reason for hiding this comment

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

and here

@dsellarsnr dsellarsnr merged commit 3bd3752 into develop May 10, 2024
@dsellarsnr dsellarsnr deleted the feature/nr-263403-nr-code-errors branch May 10, 2024 18:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants