Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Giving success message as response with 201 success status code. #14

Open
JayakrishnanJK opened this issue Jun 21, 2019 · 2 comments
Open

Comments

@JayakrishnanJK
Copy link

JayakrishnanJK commented Jun 21, 2019

Hi
i want to give success message as return along with status code.

For returning an error we are using

reject(new Error(message));

{ "resourceType": "OperationOutcome", "text": { "status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><table border=\"0\"><tr><td style=\"font-weight: bold;\">error</td><td><pre>Email Already Exists</pre></td></tr></table></div>" }, "issue": [ { "severity": "error", "code": "exception", "diagnostics": "Email Already Exists" } ] }

and its working fine.

please help us to return a success message like below mentioned. while we resolve a resource like

resolve(composition_resource);

{ "resourceType": "OperationOutcome", "text": { "status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><table border=\"0\"><tr><td style=\"font-weight: bold;\">error</td><td><pre>Resource Created</pre></td></tr></table></div>" }, "issue": [ { "severity": "information", "code": "exception", "diagnostics": "Resource Created" } ] }

@JayakrishnanJK
Copy link
Author

@jonterrylee
can you please look in to it and give a solution.

@JayakrishnanJK
Copy link
Author

@brianghig @rstjohn @andrewmarcus @jonterrylee not getting this id as return value . while tryingto resolve using
resolve({ id: location_resource.id });

Please help on this.

@JayakrishnanJK JayakrishnanJK changed the title Giving success message as response with 200 success status code. Giving success message as response with 201 success status code. Sep 4, 2019
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

No branches or pull requests

1 participant