Skip to content
  • There are no suggestions because the search field is empty.

Compiled page/application errors and how to solve them

Some quick solutions for error-handling in your Betty Blocks application.

After reading this article, you'll know:

  • What causes some errors within the platform

  • How to solve certain errors

Errors while building pages

Common errors that you might encounter when you're building a page.

GraphQL error: Unauthorized for models(s): Model name

You'll encounter this error if you lack the 'read permission' for the model containing the data you're trying to access.

downloads.intercomcdn.comio10172731648ff4a6ae2af1be358a304cf6image
 

This can be fixed by changing the permission for the model:

downloads.intercomcdn.comio1015918956ceea3506013e01fa1ab79da5image
 

You can find the Roles and permissions tab either in the data model itself or inside the Tools section.

You can also use an authentication profile on the page instead of changing the permission. If someone without an authentication profile lands on the page no data will be shown and the user gets redirected to the login page of the application.

Oops! An error occured!

This error occurs when you delete items a page references, such as another page or a partial. For example, if you delete a page that another page references, you'll encounter this error message when trying to compile the referencing page. Below is an example where an interaction redirects to a deleted page after an action is executed successfully.

downloads.intercomcdn.comio10163146489da09b394841cb2d3979261bimage
downloads.intercomcdn.comio10163176532a44cd01b5b093173a73d371image
 

To solve this error restore the missing item in the interaction or delete the interaction that gives you an error.

The same error can also be encountered when you delete a partial that's used on different pages. When the partial is deleted but the pages aren't recompiled yet, this error will pop up as well.


A separate error with the same name can also be encountered when you're working with dates:

downloads.intercomcdn.comio1019442134bd564aba30072d8ba20be2a0image

 

This error is caused by adjusting the input of date- and time picker components:

downloads.intercomcdn.comio10194434953b8c06022c9a8f336223f99bimage
 Ensure that you use proper formatting when you change the format option within these components, for example, use 'yyyy' instead of 'YYYY'.

 

GraphQL error: Conditional '_and' cannot have an empty value.

This error shows up when the data query that's performed returns an error. This can happen when you use any of the data components such as the:

  • Data container

  • Data list

  • Data table

When you create a page with an input variable like the image below:

downloads.intercomcdn.comio1017147598050072563b85124813b4eb29image
 

When you use that input in a filter on a Data container (which is something we don't recommend using, use Page variables instead), when you compile the page no 'id' is provided in the URL resulting in the error popping up:

downloads.intercomcdn.comio10171526518222c293acd726d1d76c42bcimage
 

If you change the ':id' part in the URL with an id of an object that does exist the page will load like you'd expect it to.

Error: Unauthenticated. Authorization header invalid.

You'll encounter this error when you're not authorized to run an action. For example, if you use a create form and the action behind the form is set to private, when you compile the page and try to create a new record this error will pop up.

downloads.intercomcdn.comio1019409475dacd3755f76d9265ae47e382image
 

There are two ways to resolve this error and grant the necessary permissions to run the action:

downloads.intercomcdn.comio101941760056d31fbae9e597933bbc6161image

 

  • Change the action to public: Make the action itself publicly accessible within the application.

  • Assign an authentication profile: Assign an authentication profile to the action. However, ensure that the user attempting to run the action has the corresponding authentication profile assigned to their account.

GraphQL error: in object 'Model' in the fields 'Property' are not found.

This error is triggered when a builder deletes a property in, for example, a Data table while another user is visiting the compiled page in question.

downloads.intercomcdn.comio10195721002d4eadf5356f5c7274942eb2image
 

To resolve this error the builder needs to fix the missing property references that are missing or delete the column in the Data table that references the missing property.

 

Couldn't fetch data (render children)

This error appears in a situation like a Conditional component with a Data container inside. The data inside the Data container might not be loaded when the Conditional component has already been fired. The query of the Data container might be taking longer than the logic of the Conditional component, this will result in the error popping up.

To prevent this from happening we can check the following checkbox inside of the Conditional component.

downloads.intercomcdn.comio1038328794831bf97cd1a074f0a8bab161image
 

When this option is checked, the Conditional component will only show its content when the data inside of it has been loaded. So once the queries are done and the Data container is ready to show its data, at that moment the content of this component will be shown, without an error.

Actions

Common errors that you might encounter when you're building an action.

Error: cannot compare to null

This error occurs when you use the filter in a variable that might not exist. For example, the variable used in the filter doesn't always have a value meaning that the value results in 'null'. This is a value that you might not expect hence the error popping up.
​
To work around this you can make use of the Expression step specifically, the Always return numeric value function in case of working with numeric values or the Ternary operator (if then else) when working with other data.