onaio / steps-app

WHO STEPS App
Apache License 2.0
2 stars 2 forks source link

STEPS app and website improvements #134

Closed owais-vd closed 2 years ago

owais-vd commented 2 years ago

Hi @ekigamba Could you review this PR. here is the issue https://github.com/onaio/WHOSteps/issues/7

ekigamba commented 2 years ago

Rename the PR to something more descriptive of the PR

ekigamba commented 2 years ago

We can show a helpful error message in case the upload error is recoverable. This enables the client to easily troubleshoot the issue(s) without having to request for support from us. It also provides for an easy experience. @ciremusyoka Will provide the error messages and we can provide a local/hardcoded message so that the client can easily recover or understand the upload error happening. These local messages can also be translated and each of them matches a specific error message from the server. @owais-vd What do you think?

owais-vd commented 2 years ago

Yes if the server return the type of error then we can show the local translated error base on the error type. cc: @ciremusyoka @akahure

ciremusyoka commented 2 years ago

Yes if the server return the type of error then we can show the local translated error base on the error type. cc: @ciremusyoka @akahure

@owais-vd Already we have the error message are you suggesting we add a type on the response JSON. e.g

{
'type': 'username',
'error': 'User not found'
}

See the error messages here

owais-vd commented 2 years ago

@owais-vd Already we have the error message are you suggesting we add a type on the response JSON. e.g

{
'type': 'username',
'error': 'User not found'
}

See the error messages here

yes we need unique type for each error message. like user not found, user is not assignable to survey, survey not found ...