instedd / mbuilder

Scalable SMS application builder
http://mbuilder.instedd.org/
6 stars 1 forks source link

Check for protocols of entity sets #245

Closed nditada closed 9 years ago

nditada commented 9 years ago

mBuilder is assuming any entitySet supports updates and inserts without querying the protocol. That results in bugs when attempting to write on a read only entityset. mBuilder already supports read-only tables. When an entityset does not support update/inserts, show it as readonly.

pmallol commented 9 years ago

Found in v.1.2-pre2

It is still possible to add pills to a 'read only' table from resource map (added from Resource map or through Hub) and save the message trigger. After a sandbox test an error message shows up reading: "Error: unexpected character at line 1, column 1 [parse.c:637]". Poirot log: http://poirot-stg.instedd.org/activities/5af3286c-560e-fdec-d0ec-4bfeb595e994

ggiraldez commented 9 years ago

Support for protocols is up in mBuilder, but:

vtiffenberg commented 9 years ago
vtiffenberg commented 9 years ago

With tables straight from ResourceMap actually do have a more descriptive error: "Error: Forbidden - Check the API documentation: https://github.com/instedd/resourcemap/wiki/REST_API"

Talking with Martín we thought that the endpoint with very specific Hub data does not make much sense from ResourceMap's side. Another view we thought we could take is making the error handling from Hub more descriptive so as to fail because of lack of permissions but more elegantly.

nditada commented 9 years ago

Yes, just a descriptive error explaining that the user doesn't have enough permissions is fine for now. Make sure it shows up nicely and clear in the sandbox and in the activity log.

vtiffenberg commented 9 years ago

Pushed into Hub (https://github.com/instedd/hub/commit/0eed371c64e1630090e7b935a9cc90be40e17359) error handling for the API. It now returns the Forbidden message that ResourceMap does.

mmuller commented 9 years ago

Ok in version 1.2-pre3