Even Script works only for adimin


#1

Hi Admin,

Love what you guys are doing. I am stuck with a strange issue. I wrote a event script for a db service put.pre_process which works fine when using Administrator login but fails when using any other login. I tried giving Event system access to the role still the issue is present. Also in the api error message i get a html return as below. Any help is much appreciated.

J

The server has experienced a fatal error. Our administrators will automatically be notified. However, if you would like to report additional information regarding this particular error, please open a case on our bug tracker.

<div class="inset">
    <h3>Error 500</h3>
</div>

<div class="error">
    <p class="lead">Internal Server Error</p>

    <h3>Error Details</h3>

    <div class="inset">
        <p>Array to string conversion</p>
    </div>
</div>

#2

This could be a number of things. Is anything logged in your DreamFactory log (other than what is delivered to the API error message?)
Additionally, did you give your user’s role access to the necessary API components with “script” as the requestor?


#3

Thanks. It was because “script” access was not given. Thanks ton. Should have asked you guys in advance. Wasted lot of time in the last week figuring out the root cause. Only yesterday found it is working only for admin. A error handling message could have helped.

Thanks again.

J