futtta / ao_critcss_aas

Autoptimize power-up to integrate with criticalcss.com
9 stars 1 forks source link

differenciate API key check fail between "bad key" and "other error" #64

Closed futtta closed 6 years ago

futtta commented 6 years ago

currently if a user somehow blocks outgoing requests, we still show the "wrong api key" error. it would be better to show a "could not check" or "there seems to be a problem" error instead to be able to differentiate between the two.

denydias commented 6 years ago

The 'other error' may be triggered by a curl timeout. It's possible to differentiate it from a 'bad key', but it's not possible to discover what caused the timeout itself to provide a better message. Is that ok?

futtta commented 6 years ago

it is :)

On Sat, Sep 8, 2018 at 8:21 AM, Deny Dias notifications@github.com wrote:

The 'other error' may be triggered by a curl timeout. It's possible to differentiate it from a 'bad key', but it's not possible to discover what caused the timeout itself to provide a better message. Is that ok?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/futtta/ao_critcss_aas/issues/64#issuecomment-419617038, or mute the thread https://github.com/notifications/unsubscribe-auth/AALEMWknfyPJpoAyfXlL7DfBqOfOGWcEks5uY2HWgaJpZM4Wfc30 .