amplitude / Amplitude-Swift

Native iOS/tvOS/macOS/watchOS SDK
MIT License
29 stars 20 forks source link

How do I debug 400 errors? #227

Open DataGreed opened 1 week ago

DataGreed commented 1 week ago

Summary

Currently Amplitude in my project returns 400 errors and the only way I know about this is because I have Sentry set up, but the Amplitude SDK does not print or provide any useful info about the errors. I tried setting logLevel: .DEBUG but it didn't change anything.

How do I get some meaningful debug info like http responses from Amplitude so I can handle them?

crleona commented 1 week ago

Hi @DataGreed - we're planning on improving logging in a future release, but I've improved some of the logging in http client so you can at least debug any issues you're seeing. Please try branch https://github.com/amplitude/Amplitude-Swift/tree/AMP-109939-improve-http-logging, or wait for a release in a few days.