sentry icon indicating copy to clipboard operation
sentry copied to clipboard

Cannot parse some of webhook payload of internal integration.

Open eungkyu opened this issue 1 year ago • 3 comments

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

  1. setup internal integration and webhook
  2. received various webhook by post request
  3. some of request body has invalid JSON payload and cannot be parsed.

Expected Result

Sentry should send a valid json post body

Actual Result

json post body is prematurely truncated

example

{"action":"created","installation":{"uuid":"c7d87346-e3e0-4010-b7b8-502b92f08a80"},"data":{"issue":{"id":"5385446123","shareId":null,"shortId":"LIKEY-IOS-1358","title":"작업을 완료할 수 없습니다.(Likey.LikeyError 오류 3.)","culprit":"UISystemKeyboardDockController","permalink":null,"logger":null,"level":"error","status":"unresolved","statusDetails":{},"substatus":"new","isPublic":false,"platform":"cocoa","project":{"id":"2289718","name":"likey-ios","slug":"likey-ios","platform":"apple-ios"},"type":"default","metadata":{"title":"작업을 완료할 수 없습니다.(Likey.LikeyError 오류 3.)","sdk":{"name":"sentry.cocoa","name_normalized":"sentry.cocoa"},"initial_priority":75},"numComments":0,"assignedTo":null,"isBookmarked":false,"isSubscribed":false,"subscriptionDetails":null,"hasSeen":false,"annotations":[],"issueType":"error","issueCategory":"error","priority":"high","priorityLockedAt":null,"isUnhandled":false,"count":"1","userCount":1,"firstSeen":"2024-05-21T15:13:49+00:00","lastSeen":"2024-05-21T15:13:49+00:00"}},"actor":{

this is real request body of webhoook. It ends with { character

JSON.parse throws SyntaxError: Unexpected end of JSON input

some of non alphanumeric character may cause the problem (Korean character)

Product Area

APIs

Link

No response

DSN

No response

Version

No response

eungkyu avatar May 21 '24 16:05 eungkyu

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] avatar May 21 '24 16:05 getsantry[bot]

Routing to @getsentry/product-owners-settings-integrations for triage ⏲️

getsantry[bot] avatar May 21 '24 17:05 getsantry[bot]

Hi, This is possibly related to this issue: https://github.com/getsentry/sentry/issues/71025#issuecomment-2125147615

Could you please check if the fix solved your problem?

Dhrumil-Sentry avatar May 22 '24 16:05 Dhrumil-Sentry

Thank you. But I don't know how to check with the latest commit of the product. I can test when fix is deployed to your sass platform.

eungkyu avatar May 23 '24 01:05 eungkyu

@eungkyu the fix is already deployed, please let us know if you still face this error

Dhrumil-Sentry avatar May 23 '24 01:05 Dhrumil-Sentry

@eungkyu the fix is already deployed, please let us know if you still face this error

I see. It appears to no longer occur after 2024-05-22 07:50 (UTC)

Thank you.

eungkyu avatar May 23 '24 03:05 eungkyu