Solve Log Errors : Response status: 422, body: {"message":"Request body is not processable. Please check the errors.}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2020 01:11 PM
hello
I am working on minimizing log errors.
here are some 420 errors I see in the logs> Errors which says below:
Response status: 422, body: {"message":"Request body is not processable. Please check the errors.","errors":{"owner":"id or username should be provided"},"took":0.001,"requestId":"7e92211d-5896-4ed7-adbf-1c78f92241fe"}
Source is opsgenie
source script is a script include OpsGenie_Client.
How do I resolve these errors?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2020 04:11 AM
Status code 422 is very unexpected. Sometimes the message it gives have no relation to what happens in the business-logic layer. First check passing valid owner name but as I think you mentioned above in the comments that the owner is not required or event exists.
So, in that scenario error message might be referring to owner as a resource user i.e. who has the access to the resource. Try validating the access privileges.
Also, verify all the headers required by rest API are provided.
Please mark this correct & helpful if it answered your question.
Thanks & Regards,
Sharjeel
Muhammad