HTTP Status 200 with warnings?

user151841

What would you use for a successful HTTP status code but wanted to indicate some warnings? In my case, I'm making an ajax endpoint where you can add a new user. We expect a first and last name, but if there isn't one, the record will still be created and no followup to correct the situation will be expected. I just want the client to know "We created the record, and hey, BTW, the first and/or last name was blank"

I found this question, but that's about actual ensuing errors, not warnings.

AlexZam

It seems to be an optimal way to put something like {"status":"warn","meassage":"Name field is empty"} to the response body. There is no "warning" HTTP codes. You can of course use for example 201 CREATED for clean creation and 200 OK for warnings. But that's not a good way to use them.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to cache Only http status 200 in scrapy?

From Dev

HTTP status code 200 vs 202

From Dev

Failed asserting the HTTP status code is 200 not 500

From Dev

HTTP Status Code 200-299 or 400

From Dev

HTTP 500 error failed with 200 status code

From Dev

Angular $http - spring - throws Exception but http status 200

From Dev

Drupal AJAX HTTP error occurred. HTTP status code: 200

From Dev

Why haproxy logs status code 200 when using "http-response set-status <not-200>"?

From Dev

How to deal with http status codes other than 200 in Angular 2

From Dev

Should failed login pages really be returning an HTTP 200 status?

From Dev

Angular JS using $http() get a response, with status 200, but data is null

From Dev

Apache/PHP returns HTTP Status Code 200 on error pages

From Dev

HTTP status codes : 204 OR 200 with body containing an empty object?

From Dev

Getting invalid status line 10380HTTP/1.1 200 OK

From Dev

Restlet Getting HTTP Status code 204 instead of 200

From Dev

Should failed login pages really be returning an HTTP 200 status?

From Dev

How to use Failed Request Tracing for HTTP status 200 for MVC app?

From Dev

Silex gives empty response if HTTP Status code != 200

From Dev

Enable CORS if the server http status is something other than 200

From Dev

Only status 200 is good anything else is an error in angular $http?

From Dev

MailJet: HTTP POST status code 200 but email sending is blocked

From Dev

Status 200 = HttpPut works?

From Dev

Web Api always returns http status code 200 when an exception occurs

From Dev

<error-page> defined in web.xml always comes back with HTTP status 200

From Dev

Cron job posts 40-50 new posts to WordPress then fails with transport error - HTTP status code was not 200

From Dev

JQuery ajax GET request to URL fails although HTTP status is 200 OK

From Dev

AngularJS $http.head is showing a status code of 0 despite a successful 200 response

From Dev

IIS logs 200 status but returns 500 status

From Dev

always returns status code 200

Related Related

  1. 1

    How to cache Only http status 200 in scrapy?

  2. 2

    HTTP status code 200 vs 202

  3. 3

    Failed asserting the HTTP status code is 200 not 500

  4. 4

    HTTP Status Code 200-299 or 400

  5. 5

    HTTP 500 error failed with 200 status code

  6. 6

    Angular $http - spring - throws Exception but http status 200

  7. 7

    Drupal AJAX HTTP error occurred. HTTP status code: 200

  8. 8

    Why haproxy logs status code 200 when using "http-response set-status <not-200>"?

  9. 9

    How to deal with http status codes other than 200 in Angular 2

  10. 10

    Should failed login pages really be returning an HTTP 200 status?

  11. 11

    Angular JS using $http() get a response, with status 200, but data is null

  12. 12

    Apache/PHP returns HTTP Status Code 200 on error pages

  13. 13

    HTTP status codes : 204 OR 200 with body containing an empty object?

  14. 14

    Getting invalid status line 10380HTTP/1.1 200 OK

  15. 15

    Restlet Getting HTTP Status code 204 instead of 200

  16. 16

    Should failed login pages really be returning an HTTP 200 status?

  17. 17

    How to use Failed Request Tracing for HTTP status 200 for MVC app?

  18. 18

    Silex gives empty response if HTTP Status code != 200

  19. 19

    Enable CORS if the server http status is something other than 200

  20. 20

    Only status 200 is good anything else is an error in angular $http?

  21. 21

    MailJet: HTTP POST status code 200 but email sending is blocked

  22. 22

    Status 200 = HttpPut works?

  23. 23

    Web Api always returns http status code 200 when an exception occurs

  24. 24

    <error-page> defined in web.xml always comes back with HTTP status 200

  25. 25

    Cron job posts 40-50 new posts to WordPress then fails with transport error - HTTP status code was not 200

  26. 26

    JQuery ajax GET request to URL fails although HTTP status is 200 OK

  27. 27

    AngularJS $http.head is showing a status code of 0 despite a successful 200 response

  28. 28

    IIS logs 200 status but returns 500 status

  29. 29

    always returns status code 200

HotTag

Archive