---
title: "Check Bucket Availability"
url: https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/stratus/check-bucket-availability/
description: "This page describes the method to execute circuits in your application with sample code snippets."
last_updated: 2026-09-09T10:45:38Z
service: CloudScale
type: general
related_links:
- name: "Catalyst CloudScale"
url: /en/cloud-scale/
- name: "Stratus Help Documentation"
url: /en/cloud-scale/help/stratus/introduction/
- name: "Java SDK Documentation"
url: /en/sdk/java/v1/cloud-scale/stratus/check-bucket/
- name: "Python SDK Documentation"
url: /en/sdk/python/v1/cloud-scale/stratus/check-bucket/
- name: "iOS SDK Documentation"
url: /en/sdk/ios/v2/cloud-scale/stratus/create-bucket-instance//
- name: "Android SDK Documentation"
url: /en/sdk/android/v2/cloud-scale/stratus/create-bucket-instance/
- name: "Flutter SDK Documentation"
url: /en/sdk/flutter/v2/cloud-scale/stratus/initialize-stratus/
- name: "REST API Documentation"
url: /en/api/code-reference/cloud-scale/stratus/head-bucket/#CheckBucketAvailability
repository:
name: "Repository"
url: https://github.com/catalystbyzoho/zcatalyst-sdk-js
---
# Check Bucket Availability
> **Note:** Ensure you have installed the [required package](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/stratus/overview/#prerequisites) to use this SDK method.
Using the `headBucket()` SDK method, you can check the existence of a bucket in Stratus, and further check if the user has the relevant permissions to access the objects present in the bucket.
The `stratus` reference used in the following code snippet is the [component instance](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/stratus/create-instance/).
Possible responses when using this SDK:
* If the bucket exists and if the user has the relevant permissions to access the bucket, the response '**true**' will be returned.
* If the bucket does not exist, or if the user does not have permission to access the bucket, the response '**false**' will be returned.
### Parameters Used
| Parameter Name |
Data Type |
Definition |
| `bucketName` |
**String** |
A **Mandatory** parameter. Will hold the [unique name of the bucket](https://docs.catalyst.zoho.com/en/cloud-scale/help/stratus/buckets/name-bucket/#ideal-practices-to-name-a-bucket). |
| `throwErr` |
**Boolean** |
An **Optional** parameter. If you set this parameter as "**true**", then it will throw an error when the bucket is not found in the project. The default value is "**false**". |
```javascript
const headBucketResponse = await stratus.headBucket('bucketName'); // check the bucket is available in stratus
console.log(headBucketResponse);
```
### Example of Expected Response
```text
head bucket:::: true
```
### Possible Errors
> **Note:** If you use the SDK with the `throw_err` parameter, and the bucket does not exist, or if you do not have sufficient permissions then you may encounter any of the errors listed below.
| Error Code |
Meaning |
| `404` |
**Not Found**. Bucket Not found in Stratus. |
| `401` |
**Unauthorized/Access Denied** - User doesn't have permission to perform the particular operation. |
| `403` |
**Permission Denied** - User does not have permission to access the particular bucket. |